summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-29 20:33:10 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-29 20:33:10 +0300
commit9f1994182d4225f630a93ae06b01927c4f7a9a37 (patch)
treeb3557f6c6e6a923170929fd6553b59f872634291 /src/being
parentaef032f93b7bdc6e5908b2fa5f940a43bcfce50e (diff)
downloadmanaverse-9f1994182d4225f630a93ae06b01927c4f7a9a37.tar.gz
manaverse-9f1994182d4225f630a93ae06b01927c4f7a9a37.tar.bz2
manaverse-9f1994182d4225f630a93ae06b01927c4f7a9a37.tar.xz
manaverse-9f1994182d4225f630a93ae06b01927c4f7a9a37.zip
Convert ActorType enum into strong typed enum.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/actorsprite.h2
-rw-r--r--src/being/being.cpp6
-rw-r--r--src/being/being.h10
3 files changed, 9 insertions, 9 deletions
diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h
index 9e676193e..97553171a 100644
--- a/src/being/actorsprite.h
+++ b/src/being/actorsprite.h
@@ -65,7 +65,7 @@ class ActorSprite notfinal : public CompoundSprite, public Actor
/**
* Returns the type of the ActorSprite.
*/
- virtual ActorType::Type getType() const A_WARN_UNUSED
+ virtual ActorTypeT getType() const A_WARN_UNUSED
{ return ActorType::Unknown; }
void draw1(Graphics *const graphics,
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 68efe4c65..1362c904a 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -126,7 +126,7 @@ typedef std::map<int, Guild*>::const_iterator GuildsMapCIter;
typedef std::map<int, int>::const_iterator IntMapCIter;
Being::Being(const BeingId id,
- const ActorType::Type type,
+ const ActorTypeT type,
const BeingTypeId subtype,
Map *const map) :
ActorSprite(id),
@@ -3083,7 +3083,7 @@ void Being::updateComment()
}
std::string Being::loadComment(const std::string &name,
- const ActorType::Type &type)
+ const ActorTypeT &type)
{
std::string str;
switch (type)
@@ -3122,7 +3122,7 @@ std::string Being::loadComment(const std::string &name,
void Being::saveComment(const std::string &restrict name,
const std::string &restrict comment,
- const ActorType::Type &restrict type)
+ const ActorTypeT &restrict type)
{
std::string dir;
switch (type)
diff --git a/src/being/being.h b/src/being/being.h
index b7ac4fcf0..b1639f250 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -106,7 +106,7 @@ class Being notfinal : public ActorSprite,
* @param map the map the being is on
*/
Being(const BeingId id,
- const ActorType::Type type,
+ const ActorTypeT type,
const BeingTypeId subtype,
Map *const map);
@@ -114,7 +114,7 @@ class Being notfinal : public ActorSprite,
virtual ~Being();
- ActorType::Type getType() const override final A_WARN_UNUSED
+ ActorTypeT getType() const override final A_WARN_UNUSED
{ return mType; }
/**
@@ -736,12 +736,12 @@ class Being notfinal : public ActorSprite,
static void clearCache();
static std::string loadComment(const std::string &name,
- const ActorType::Type &type)
+ const ActorTypeT &type)
A_WARN_UNUSED;
static void saveComment(const std::string &restrict name,
const std::string &restrict comment,
- const ActorType::Type &restrict type);
+ const ActorTypeT &restrict type);
bool isAdvanced() const A_WARN_UNUSED
{ return mAdvanced; }
@@ -1023,7 +1023,7 @@ class Being notfinal : public ActorSprite,
void dumpSprites() const;
- const ActorType::Type mType;
+ const ActorTypeT mType;
/** Speech Bubble components */
SpeechBubble *mSpeechBubble;