summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-07 19:34:52 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-07 19:34:52 +0300
commit9e83411f7e4147d09af5a5006888dcc187ea0ef8 (patch)
treec084bdf8afabc6220779645dcb5dbf71af6a151f /src/localplayer.cpp
parentbc7d91cc0c9c0f6dcad01d612932c6899afb5514 (diff)
downloadmv-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.gz
mv-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.bz2
mv-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.xz
mv-9e83411f7e4147d09af5a5006888dcc187ea0ef8.zip
Fix some warnings under gcc 4.7.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index a776f0165..a6289d9bb 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -89,7 +89,7 @@
const short walkingKeyboardDelay = 1000;
const short awayLimitTimer = 60;
-LocalPlayer *player_node = NULL;
+LocalPlayer *player_node = nullptr;
extern std::list<BeingCacheEntry*> beingInfoCache;
extern OkDialog *weightNotice;
@@ -101,10 +101,10 @@ LocalPlayer::LocalPlayer(int id, int subtype):
Being(id, PLAYER, subtype, 0),
mTargetTime(-1),
mLastTarget(-1),
- mTarget(NULL),
+ mTarget(nullptr),
mPlayerFollowed(""),
mPlayerImitated(""),
- mPickUpTarget(NULL),
+ mPickUpTarget(nullptr),
mGoingToTarget(false), mKeepAttacking(false),
mLastAction(-1),
mWalkingDir(0),
@@ -305,7 +305,7 @@ void LocalPlayer::logic()
if (get_elapsed_time(mTargetTime) >= 60000)
{
mTargetTime = tick_time;
-// setTarget(NULL);
+// setTarget(nullptr);
mLastTarget = -1;
}
@@ -384,7 +384,7 @@ void LocalPlayer::setAction(Action action, int attackType)
debugMsg(_("You were killed by ") + mLastHitFrom);
mLastHitFrom = "";
}
- setTarget(NULL);
+ setTarget(nullptr);
}
Being::setAction(action, attackType);
@@ -942,7 +942,7 @@ bool LocalPlayer::pickUp(FloorItem *item)
if (dx * dx + dy * dy < dist)
{
Net::getPlayerHandler()->pickUp(item);
- mPickUpTarget = NULL;
+ mPickUpTarget = nullptr;
}
else if (mPickUpType >= 4 && mPickUpType <= 6)
{
@@ -1408,7 +1408,7 @@ void LocalPlayer::untarget()
setAction(STAND);
if (mTarget)
- setTarget(NULL);
+ setTarget(nullptr);
mKeepAttacking = false;
mLastTarget = -1;
@@ -1948,7 +1948,7 @@ void LocalPlayer::changeEquipmentBeforeAttack(Being* target)
bool allowSword = false;
int dx = target->getTileX() - mX;
int dy = target->getTileY() - mY;
- Item *item = NULL;
+ Item *item = nullptr;
if (dx * dx + dy * dy > 80)
return;