From 9f1994182d4225f630a93ae06b01927c4f7a9a37 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 May 2015 20:33:10 +0300 Subject: Convert ActorType enum into strong typed enum. --- src/being/actorsprite.h | 2 +- src/being/being.cpp | 6 +++--- src/being/being.h | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/being') 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::const_iterator GuildsMapCIter; typedef std::map::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; -- cgit v1.2.3-60-g2f50