From daf84780d386ee122ae4b4bd37b1e918f93fb202 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 21 Jan 2012 02:38:18 +0300 Subject: Fix more warnings. --- src/gui/killstats.cpp | 10 +++++----- src/gui/serverdialog.cpp | 2 +- src/gui/statuswindow.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gui') diff --git a/src/gui/killstats.cpp b/src/gui/killstats.cpp index fa6241ef6..972c660ec 100644 --- a/src/gui/killstats.cpp +++ b/src/gui/killstats.cpp @@ -70,8 +70,8 @@ KillStats::KillStats(): xpNextLevel = 1; mLine1 = new Label(strprintf(_("Level: %d at %f%%"), - player_node->getLevel(), static_cast(xp) - / static_cast(xpNextLevel) * 100.0f)); + player_node->getLevel(), static_cast(xp) + / static_cast(xpNextLevel) * 100.0)); mLine2 = new Label(strprintf(_("Exp: %d/%d Left: %d"), xp, xpNextLevel, xpNextLevel - xp)); @@ -206,9 +206,9 @@ void KillStats::gainXp(int xp) timeDiff = 1; mLine1->setCaption(strprintf(_("Level: %d at %f%%"), - player_node->getLevel(), static_cast( - PlayerInfo::getAttribute(EXP)) / static_cast( - xpNextLevel) * 100.0f)); + player_node->getLevel(), static_cast( + PlayerInfo::getAttribute(EXP)) / static_cast( + xpNextLevel) * 100.0)); mLine2->setCaption(strprintf(_("Exp: %d/%d Left: %d"), PlayerInfo::getAttribute(EXP), xpNextLevel, diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp index 0cfa2d40b..019ea9f1c 100644 --- a/src/gui/serverdialog.cpp +++ b/src/gui/serverdialog.cpp @@ -558,7 +558,7 @@ void ServerDialog::logic() else if (mDownloadStatus == DOWNLOADING_IN_PROGRESS) { mDescription->setCaption(strprintf(_("Downloading server list..." - "%2.2f%%"), mDownloadProgress * 100)); + "%2.2f%%"), static_cast(mDownloadProgress * 100))); } else if (mDownloadStatus == DOWNLOADING_IDLE) { diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp index 20a017a41..410ee08e2 100644 --- a/src/gui/statuswindow.cpp +++ b/src/gui/statuswindow.cpp @@ -522,7 +522,7 @@ void StatusWindow::updateProgressBar(ProgressBar *bar, int value, int max, / static_cast(max); if (percent) - bar->setText(strprintf("%2.5f", 100 * progress) + "%"); + bar->setText(strprintf("%2.5f%%", static_cast(100 * progress))); else bar->setText(toString(value) + "/" + toString(max)); -- cgit v1.2.3-70-g09d2