From 2a33b736dc93251bf7a72364c5f818142362a3ce Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 30 May 2015 17:04:50 +0300 Subject: Convert Reachable enum into strong typed enum. --- src/being/being.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/being/being.h') diff --git a/src/being/being.h b/src/being/being.h index ead24af3f..6e8588213 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -23,6 +23,8 @@ #ifndef BEING_BEING_H #define BEING_BEING_H +#include "enums/being/reachable.h" + #include "enums/simpletypes/move.h" #include "resources/beinginfo.h" @@ -556,11 +558,11 @@ class Being notfinal : public ActorSprite, virtual int getLevel() const A_WARN_UNUSED { return mLevel; } - void setIsReachable(const int n) - { mIsReachable = n; } + void setReachable(const ReachableT n) + { mReachable = n; } - int isReachable() const A_WARN_UNUSED - { return mIsReachable; } + ReachableT getReachable() const A_WARN_UNUSED + { return mReachable; } static void reReadConfig(); @@ -1058,7 +1060,7 @@ class Being notfinal : public ActorSprite, int mHP; int mMaxHP; int mDistance; - int mIsReachable; /**< 0 - unknown, 1 - reachable, 2 - not reachable*/ + ReachableT mReachable; /**< 0 - unknown, 1 - reachable, 2 - not reachable*/ int mGoodStatus; static int mUpdateConfigTime; -- cgit v1.2.3-60-g2f50