summaryrefslogtreecommitdiff
path: root/src/gui/windows/killstats.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-06 23:34:34 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-07 19:23:40 +0300
commit36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch)
tree190156cb88b13a38a6d13c69ee0742cc078065a1 /src/gui/windows/killstats.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/gui/windows/killstats.cpp')
-rw-r--r--src/gui/windows/killstats.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp
index 005052fd4..da3b6224e 100644
--- a/src/gui/windows/killstats.cpp
+++ b/src/gui/windows/killstats.cpp
@@ -108,13 +108,13 @@ KillStats::KillStats() :
setStickyButtonLock(true);
setDefaultSize(250, 250, 350, 300);
- if (setupWindow)
+ if (setupWindow != nullptr)
setupWindow->registerWindowForReset(this);
const int xp(PlayerInfo::getAttribute(Attributes::PLAYER_EXP));
int xpNextLevel(PlayerInfo::getAttribute(Attributes::PLAYER_EXP_NEEDED));
- if (!xpNextLevel)
+ if (xpNextLevel == 0)
xpNextLevel = 1;
// TRANSLATORS: kill stats window label
@@ -205,7 +205,7 @@ void KillStats::gainXp(int xp)
Attributes::PLAYER_EXP_NEEDED);
if (xp == expNeed)
xp = 0;
- else if (!xp)
+ else if (xp == 0)
return;
mKillCounter++;
@@ -213,7 +213,7 @@ void KillStats::gainXp(int xp)
mExpCounter = mExpCounter + xp;
mExpTCounter = mExpTCounter + xp;
- if (!mKillCounter)
+ if (mKillCounter == 0)
mKillCounter = 1;
const float AvgExp = static_cast<float>(mExpCounter)
@@ -223,7 +223,7 @@ void KillStats::gainXp(int xp)
if (mKillTimer == 0)
mKillTimer = cur_time;
- if (!xpNextLevel)
+ if (xpNextLevel == 0)
xpNextLevel = 1;
double timeDiff = difftime(cur_time, mKillTimer) / 60;