summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-01 20:49:03 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-02 00:37:51 +0300
commit4df121e6dcdf53436f50ce81dd60096ce0138a2c (patch)
tree7cadc707bb49e4c148ba9c182075697a9643e20a /src/localplayer.cpp
parented3410d7eb61593a2235ddba97ce257c85e405a6 (diff)
downloadplus-4df121e6dcdf53436f50ce81dd60096ce0138a2c.tar.gz
plus-4df121e6dcdf53436f50ce81dd60096ce0138a2c.tar.bz2
plus-4df121e6dcdf53436f50ce81dd60096ce0138a2c.tar.xz
plus-4df121e6dcdf53436f50ce81dd60096ce0138a2c.zip
Add const to more classes.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 3a001ca31..5a5c87221 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -390,7 +390,7 @@ void LocalPlayer::setGMLevel(const int level)
}
-Position LocalPlayer::getNextWalkPosition(unsigned char dir) const
+Position LocalPlayer::getNextWalkPosition(const unsigned char dir) const
{
// Compute where the next tile will be set.
int dx = 0, dy = 0;
@@ -1503,7 +1503,7 @@ int LocalPlayer::getAttackRange() const
bool LocalPlayer::withinAttackRange(const Being *const target,
const bool fixDistance,
- const int addRange)
+ const int addRange) const
{
if (!target)
return false;
@@ -2112,7 +2112,7 @@ static const char *debugPathStrings[] =
N_("(b) black & white map view")
};
-std::string LocalPlayer::getDebugPathString()
+std::string LocalPlayer::getDebugPathString() const
{
return gettext(getVarItem(&debugPathStrings[0],
viewport->getDebugPath(), debugPathSize));
@@ -2245,7 +2245,7 @@ static const char *cameraModeStrings[] =
N_("(?) away")
};
-std::string LocalPlayer::getCameraModeString()
+std::string LocalPlayer::getCameraModeString() const
{
return gettext(getVarItem(&cameraModeStrings[0],
viewport->getCameraMode(), cameraModeSize));
@@ -3171,7 +3171,7 @@ void LocalPlayer::moveByDirection(const unsigned char dir)
move(dx, dy);
}
-void LocalPlayer::specialMove(unsigned char direction)
+void LocalPlayer::specialMove(const unsigned char direction)
{
if (direction && (mNavigateX || mNavigateY))
navigateClean();
@@ -3216,7 +3216,7 @@ void LocalPlayer::debugMsg(std::string str) const
debugChatTab->chatLog(str);
}
-void LocalPlayer::magicAttack()
+void LocalPlayer::magicAttack() const
{
if (!chatWindow || !isAlive()
|| !Net::getPlayerHandler()->canUseMagic())
@@ -3744,7 +3744,7 @@ int LocalPlayer::getPathLength(const Being *const being)
}
}
-int LocalPlayer::getAttackRange2()
+int LocalPlayer::getAttackRange2() const
{
int range = getAttackRange();
if (range == 1)
@@ -3823,7 +3823,7 @@ void LocalPlayer::cancelFollow()
}
void LocalPlayer::imitateEmote(const Being *const being,
- const unsigned char action)
+ const unsigned char action) const
{
if (!being)
return;
@@ -3900,7 +3900,7 @@ void LocalPlayer::imitateOutfit(Being *const player, const int sprite) const
if (equipmentSprite)
{
// logger->log("have equipmentSprite");
- Inventory *const inv = PlayerInfo::getInventory();
+ const Inventory *const inv = PlayerInfo::getInventory();
if (!inv)
return;