summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-23 00:10:43 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-23 00:10:43 +0300
commitd97189f055798b5b2051c1c5770a3def62747461 (patch)
treed66a891dba33d2ce1c882e0de7d6145bb2e0326b /src/localplayer.cpp
parent25dce1399e40f24809842303d48ef090439de1e5 (diff)
downloadmv-d97189f055798b5b2051c1c5770a3def62747461.tar.gz
mv-d97189f055798b5b2051c1c5770a3def62747461.tar.bz2
mv-d97189f055798b5b2051c1c5770a3def62747461.tar.xz
mv-d97189f055798b5b2051c1c5770a3def62747461.zip
Improve perfomance in some object constructors.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 52d154231..dc5c697db 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -92,6 +92,7 @@ extern SkillDialog *skillDialog;
LocalPlayer::LocalPlayer(int id, int subtype):
Being(id, PLAYER, subtype, nullptr),
+ mUpdateName(true),
mTargetTime(-1),
mLastTarget(-1),
mTarget(nullptr),
@@ -105,6 +106,7 @@ LocalPlayer::LocalPlayer(int id, int subtype):
mPathSetByMouse(false),
mLocalWalkTime(-1),
mMessageTime(0),
+ mAwayListener(new AwayListener),
mAwayDialog(nullptr),
mAfkTime(0),
mAwayMode(false),
@@ -136,10 +138,6 @@ LocalPlayer::LocalPlayer(int id, int subtype):
mAdvanced = true;
- mAwayListener = new AwayListener();
-
- mUpdateName = true;
-
mTextColor = &Theme::getThemeColor(Theme::PLAYER);
if (userPalette)
mNameColor = &userPalette->getColor(UserPalette::SELF);