From f98d003e354a1792117b7cbc771d1dd91475a156 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 18 Mar 2011 17:48:29 +0200 Subject: Fix most old style cast except manaserv and libxml2 defines. --- src/gui/specialswindow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gui/specialswindow.cpp') diff --git a/src/gui/specialswindow.cpp b/src/gui/specialswindow.cpp index b2c57775f..51d31f2c9 100644 --- a/src/gui/specialswindow.cpp +++ b/src/gui/specialswindow.cpp @@ -237,8 +237,8 @@ SpecialEntry::SpecialEntry(SpecialInfo *info) : float progress = 0; if (info->rechargeNeeded) { - progress = (float)info->rechargeCurrent - / (float)info->rechargeNeeded; + progress = static_cast(info->rechargeCurrent) + / static_cast(info->rechargeNeeded); } mRechargeBar = new ProgressBar(progress, 100, 10, Theme::PROG_MP); mRechargeBar->setSmoothProgress(false); @@ -252,7 +252,8 @@ void SpecialEntry::update(int current, int needed) { if (mRechargeBar && needed) { - float progress = (float)current / (float)needed; + float progress = static_cast(current) + / static_cast(needed); mRechargeBar->setProgress(progress); } } -- cgit v1.2.3-60-g2f50