summaryrefslogtreecommitdiff
path: root/src/gui/windows/killstats.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-27 23:43:44 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-27 23:43:44 +0300
commita8041ac28118de1caef73bdac9567c9a7e25e41f (patch)
treef5c9842626b0ebeb6328566fbd1f0a424fb9af47 /src/gui/windows/killstats.cpp
parentf70dcfe0a82db3aee879953f117d12aecc4fce85 (diff)
downloadplus-a8041ac28118de1caef73bdac9567c9a7e25e41f.tar.gz
plus-a8041ac28118de1caef73bdac9567c9a7e25e41f.tar.bz2
plus-a8041ac28118de1caef73bdac9567c9a7e25e41f.tar.xz
plus-a8041ac28118de1caef73bdac9567c9a7e25e41f.zip
Fix some issues with int64 to int32 implicit conversions.
Diffstat (limited to 'src/gui/windows/killstats.cpp')
-rw-r--r--src/gui/windows/killstats.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp
index a110f21f1..ec6d331d8 100644
--- a/src/gui/windows/killstats.cpp
+++ b/src/gui/windows/killstats.cpp
@@ -288,7 +288,8 @@ void KillStats::gainXp(int64_t xp)
}
// TRANSLATORS: kill stats window label
mLine4->setCaption(strprintf(_("Kills: %s, total exp: %s"),
- toString(mKillCounter).c_str(), toString(mExpCounter).c_str()));
+ toString(mKillCounter).c_str(),
+ toString(CAST_U64(mExpCounter)).c_str()));
// TRANSLATORS: kill stats window label
mLine7->setCaption(strprintf(_("Kills/Min: %s, Exp/Min: %s"),
@@ -314,7 +315,7 @@ void KillStats::recalcStats()
{
const int64_t newExp = PlayerInfo::getAttribute(Attributes::PLAYER_EXP);
if (m1minExpTime != 0)
- m1minSpeed = newExp - m1minExpNum;
+ m1minSpeed = CAST_S32(newExp - m1minExpNum);
else
m1minSpeed = 0;
m1minExpTime = curTime;
@@ -326,7 +327,7 @@ void KillStats::recalcStats()
const int newExp = PlayerInfo::getAttribute(
Attributes::PLAYER_EXP_NEEDED);
if (m1minExpTime != 0)
- m1minSpeed = newExp - m1minExpNum;
+ m1minSpeed = CAST_S32(newExp - m1minExpNum);
mStatsReUpdated = true;
m1minExpNum = newExp;
}
@@ -335,7 +336,7 @@ void KillStats::recalcStats()
{
const int64_t newExp = PlayerInfo::getAttribute(Attributes::PLAYER_EXP);
if (m5minExpTime != 0)
- m5minSpeed = newExp - m5minExpNum;
+ m5minSpeed = CAST_S32(newExp - m5minExpNum);
else
m5minSpeed = 0;
m5minExpTime = curTime;
@@ -346,7 +347,7 @@ void KillStats::recalcStats()
{
const int64_t newExp = PlayerInfo::getAttribute(Attributes::PLAYER_EXP);
if (m15minExpTime != 0)
- m15minSpeed = newExp - m15minExpNum;
+ m15minSpeed = CAST_S32(newExp - m15minExpNum);
else
m15minSpeed = 0;
m15minExpTime = curTime;