summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-23 01:48:40 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-23 01:48:40 +0300
commit6257baccabe0f4477e7d3165e52ddf714dcff540 (patch)
tree2b14e89c60c78998ea1048ca34a21160dc7f6870 /src
parentb50eee3c4571c4a4657bc14c2935067d833bb801 (diff)
downloadmv-6257baccabe0f4477e7d3165e52ddf714dcff540.tar.gz
mv-6257baccabe0f4477e7d3165e52ddf714dcff540.tar.bz2
mv-6257baccabe0f4477e7d3165e52ddf714dcff540.tar.xz
mv-6257baccabe0f4477e7d3165e52ddf714dcff540.zip
Add const attribute to being classes.
Diffstat (limited to 'src')
-rw-r--r--src/being/being.h6
-rw-r--r--src/being/localplayer.h5
-rw-r--r--src/being/playerinfo.cpp4
-rw-r--r--src/being/playerinfo.h7
4 files changed, 7 insertions, 15 deletions
diff --git a/src/being/being.h b/src/being/being.h
index 0f094c908..a2ca63cf0 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -236,7 +236,7 @@ class Being notfinal : public ActorSprite,
*/
void setGuildName(const std::string &name);
- void setGuildPos(const std::string &pos);
+ void setGuildPos(const std::string &pos) A_CONST;
/**
* Adds a guild to the being.
@@ -859,9 +859,9 @@ class Being notfinal : public ActorSprite,
void setLook(const uint16_t look);
- static uint8_t genderToInt(const GenderT sex) A_WARN_UNUSED;
+ static uint8_t genderToInt(const GenderT sex) A_CONST A_WARN_UNUSED;
- static GenderT intToGender(const uint8_t sex) A_WARN_UNUSED;
+ static GenderT intToGender(const uint8_t sex) A_CONST A_WARN_UNUSED;
NextSoundInfo mNextSound;
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index e47ad4d20..582382e2c 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -356,7 +356,7 @@ class LocalPlayer final : public Being,
int getPathLength(const Being *const being) const A_WARN_UNUSED;
- void targetMoved() const;
+ void targetMoved() const A_CONST;
void setLastHitFrom(const std::string &n)
{ mLastHitFrom = n; }
@@ -365,7 +365,8 @@ class LocalPlayer final : public Being,
void checkNewName(Being *const being);
- unsigned char getBlockWalkMask() const override final A_WARN_UNUSED;
+ unsigned char getBlockWalkMask() const override final
+ A_CONST A_WARN_UNUSED;
void saveHomes();
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp
index 0f9eb6b6c..76ccdcce4 100644
--- a/src/being/playerinfo.cpp
+++ b/src/being/playerinfo.cpp
@@ -389,10 +389,6 @@ int getCharId()
return mCharId;
}
-void logic()
-{
-}
-
Trading isTrading()
{
return mTrading;
diff --git a/src/being/playerinfo.h b/src/being/playerinfo.h
index fbd8d4109..e40c2ac85 100644
--- a/src/being/playerinfo.h
+++ b/src/being/playerinfo.h
@@ -197,11 +197,6 @@ namespace PlayerInfo
int getCharId();
/**
- * Does necessary updates every tick.
- */
- void logic();
-
- /**
* Returns true if the player is involved in a trade at the moment, false
* otherwise.
*/
@@ -217,7 +212,7 @@ namespace PlayerInfo
/**
* Initializes some internals.
*/
- void init();
+ void init() A_CONST;
void deinit();