From a8041ac28118de1caef73bdac9567c9a7e25e41f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 27 Sep 2017 23:43:44 +0300 Subject: Fix some issues with int64 to int32 implicit conversions. --- src/gui/windows/killstats.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/gui/windows/killstats.cpp') 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; -- cgit v1.2.3-70-g09d2