diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-29 21:42:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-29 22:43:38 +0300 |
commit | 3411edb5d3ae07d247421e4b8f7936a22b7b4027 (patch) | |
tree | 63685d0979938a42a62b3f0a880663bb06f4e8ca /src/listeners | |
parent | 390e5da0f9ecc4407aa7d4bcba1af5730db56271 (diff) | |
download | manaplus-3411edb5d3ae07d247421e4b8f7936a22b7b4027.tar.gz manaplus-3411edb5d3ae07d247421e4b8f7936a22b7b4027.tar.bz2 manaplus-3411edb5d3ae07d247421e4b8f7936a22b7b4027.tar.xz manaplus-3411edb5d3ae07d247421e4b8f7936a22b7b4027.zip |
Convert Attributes enum into strong typed enum.
Diffstat (limited to 'src/listeners')
-rw-r--r-- | src/listeners/attributelistener.cpp | 2 | ||||
-rw-r--r-- | src/listeners/attributelistener.h | 6 | ||||
-rw-r--r-- | src/listeners/statlistener.cpp | 2 | ||||
-rw-r--r-- | src/listeners/statlistener.h | 6 |
4 files changed, 10 insertions, 6 deletions
diff --git a/src/listeners/attributelistener.cpp b/src/listeners/attributelistener.cpp index 4026f09d5..4aa1a75a9 100644 --- a/src/listeners/attributelistener.cpp +++ b/src/listeners/attributelistener.cpp @@ -24,7 +24,7 @@ defineListener(AttributeListener) -void AttributeListener::distributeEvent(const int id, +void AttributeListener::distributeEvent(const AttributesT id, const int oldVal, const int newVal) { diff --git a/src/listeners/attributelistener.h b/src/listeners/attributelistener.h index b277fe876..704b722a7 100644 --- a/src/listeners/attributelistener.h +++ b/src/listeners/attributelistener.h @@ -21,6 +21,8 @@ #ifndef LISTENERS_ATTRIBUTELISTENER_H #define LISTENERS_ATTRIBUTELISTENER_H +#include "enums/being/attributes.h" + #include "listeners/baselistener.hpp" #include "localconsts.h" @@ -28,11 +30,11 @@ class AttributeListener notfinal { public: - virtual void attributeChanged(const int id, + virtual void attributeChanged(const AttributesT id, const int oldVal, const int newVal) = 0; - static void distributeEvent(const int id, + static void distributeEvent(const AttributesT id, const int oldVal, const int newVal); diff --git a/src/listeners/statlistener.cpp b/src/listeners/statlistener.cpp index f8200aa54..f5c0d57d0 100644 --- a/src/listeners/statlistener.cpp +++ b/src/listeners/statlistener.cpp @@ -24,7 +24,7 @@ defineListener(StatListener) -void StatListener::distributeEvent(const int id, +void StatListener::distributeEvent(const AttributesT id, const int oldVal1, const int oldVal2) { diff --git a/src/listeners/statlistener.h b/src/listeners/statlistener.h index 3ba1338cd..7e389a24f 100644 --- a/src/listeners/statlistener.h +++ b/src/listeners/statlistener.h @@ -21,6 +21,8 @@ #ifndef LISTENERS_STATLISTENER_H #define LISTENERS_STATLISTENER_H +#include "enums/being/attributes.h" + #include "listeners/baselistener.hpp" #include "localconsts.h" @@ -28,11 +30,11 @@ class StatListener notfinal { public: - virtual void statChanged(const int id, + virtual void statChanged(const AttributesT id, const int oldVal1, const int oldVal2) = 0; - static void distributeEvent(const int id, + static void distributeEvent(const AttributesT id, const int oldVal1, const int oldVal2); |