diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-18 17:48:29 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-18 17:49:00 +0200 |
commit | f98d003e354a1792117b7cbc771d1dd91475a156 (patch) | |
tree | dc2a297f7c4026394c9954ae4bfd4abd22ef9612 /src/gui/specialswindow.cpp | |
parent | bb0a6cb25b2985fd1f74c9d27d5a46f6863e2dee (diff) | |
download | plus-f98d003e354a1792117b7cbc771d1dd91475a156.tar.gz plus-f98d003e354a1792117b7cbc771d1dd91475a156.tar.bz2 plus-f98d003e354a1792117b7cbc771d1dd91475a156.tar.xz plus-f98d003e354a1792117b7cbc771d1dd91475a156.zip |
Fix most old style cast except manaserv and libxml2 defines.
Diffstat (limited to 'src/gui/specialswindow.cpp')
-rw-r--r-- | src/gui/specialswindow.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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<float>(info->rechargeCurrent) + / static_cast<float>(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<float>(current) + / static_cast<float>(needed); mRechargeBar->setProgress(progress); } } |