From a6623430aa11b02f93761d27c25db9bb4157ec6f Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 15 Feb 2009 21:30:58 +0100 Subject: Fixed compiler warnings Comparison between signed and unsigned integer expressions. --- src/gui/status.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/gui/status.cpp') diff --git a/src/gui/status.cpp b/src/gui/status.cpp index cb02a57a..2c665c7c 100644 --- a/src/gui/status.cpp +++ b/src/gui/status.cpp @@ -38,8 +38,7 @@ StatusWindow::StatusWindow(LocalPlayer *player): Window(player->getName()), mPlayer(player), - currency(-1), - currencyS("?") + mCurrency(0) { setWindowName(_("Status")); setCloseButton(true); @@ -52,7 +51,8 @@ StatusWindow::StatusWindow(LocalPlayer *player): mLvlLabel = new gcn::Label(strprintf(_("Level: %d"), 0)); mJobLvlLabel = new gcn::Label(strprintf(_("Job: %d"), 0)); - mGpLabel = new gcn::Label(strprintf(_("Money: %s"), "")); + mGpLabel = new gcn::Label(strprintf(_("Money: %s"), + Units::formatCurrency(mCurrency).c_str())); mHpLabel = new gcn::Label(_("HP:")); mHpBar = new ProgressBar(1.0f, 80, 15, 0, 171, 34); @@ -174,10 +174,10 @@ void StatusWindow::update() mJobLvlLabel->setCaption(strprintf(_("Job: %d"), mPlayer->mJobLevel)); mJobLvlLabel->adjustSize(); - if (currency != mPlayer->mGp) { - currency = mPlayer->mGp; - currencyS = strprintf(_("Money: %s"), Units::formatCurrency(currency).c_str()); - mGpLabel->setCaption(currencyS); + if (mCurrency != mPlayer->mGp) { + mCurrency = mPlayer->mGp; + mGpLabel->setCaption(strprintf(_("Money: %s"), + Units::formatCurrency(mCurrency).c_str())); mGpLabel->adjustSize(); } -- cgit v1.2.3-70-g09d2