summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-29 23:49:29 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-29 23:49:29 +0300
commit45379d14d9d3c7f4673b8390cb95d98bb1759f45 (patch)
tree698fe787014ca277f5b23144136d4e5417c6b444 /src/being
parent273b79cf4f52c846508f3493727e34b1811ecfd5 (diff)
downloadplus-45379d14d9d3c7f4673b8390cb95d98bb1759f45.tar.gz
plus-45379d14d9d3c7f4673b8390cb95d98bb1759f45.tar.bz2
plus-45379d14d9d3c7f4673b8390cb95d98bb1759f45.tar.xz
plus-45379d14d9d3c7f4673b8390cb95d98bb1759f45.zip
Convert Gender enum into strong typed enum.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp6
-rw-r--r--src/being/being.h10
2 files changed, 8 insertions, 8 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 7c250aac3..f433ec964 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -2452,7 +2452,7 @@ BeingCacheEntry* Being::getCacheEntry(const BeingId id)
}
-void Being::setGender(const Gender::Type gender)
+void Being::setGender(const GenderT gender)
{
if (gender != mGender)
{
@@ -3239,7 +3239,7 @@ void Being::updatePercentHP()
BLOCK_END("Being::updatePercentHP")
}
-uint8_t Being::genderToInt(const Gender::Type sex)
+uint8_t Being::genderToInt(const GenderT sex)
{
switch (sex)
{
@@ -3254,7 +3254,7 @@ uint8_t Being::genderToInt(const Gender::Type sex)
}
}
-Gender::Type Being::intToGender(const uint8_t sex)
+GenderT Being::intToGender(const uint8_t sex)
{
switch (sex)
{
diff --git a/src/being/being.h b/src/being/being.h
index d21ad8acc..63b531ff3 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -580,9 +580,9 @@ class Being notfinal : public ActorSprite,
/**
* Sets the gender of this being.
*/
- virtual void setGender(const Gender::Type gender);
+ virtual void setGender(const GenderT gender);
- Gender::Type getGender() const A_WARN_UNUSED
+ GenderT getGender() const A_WARN_UNUSED
{ return mGender; }
/**
@@ -848,9 +848,9 @@ class Being notfinal : public ActorSprite,
void setLook(const uint16_t look);
- static uint8_t genderToInt(const Gender::Type sex) A_WARN_UNUSED;
+ static uint8_t genderToInt(const GenderT sex) A_WARN_UNUSED;
- static Gender::Type intToGender(const uint8_t sex) A_WARN_UNUSED;
+ static GenderT intToGender(const uint8_t sex) A_WARN_UNUSED;
NextSoundInfo mNextSound;
@@ -995,7 +995,7 @@ class Being notfinal : public ActorSprite,
int mPreStandTime;
- Gender::Type mGender;
+ GenderT mGender;
BeingActionT mAction;
BeingTypeId mSubType; /**< Subtype (graphical view, basically) */
uint8_t mDirection; /**< Facing direction */