diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-15 21:30:58 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-15 21:33:08 +0100 |
commit | a6623430aa11b02f93761d27c25db9bb4157ec6f (patch) | |
tree | fbee4b379bbe786a0acfbf5a21d7bc85d88ff77f /src/gui/status.cpp | |
parent | 2398fc21de78bb720de672355c7972999a92e47a (diff) | |
download | mana-a6623430aa11b02f93761d27c25db9bb4157ec6f.tar.gz mana-a6623430aa11b02f93761d27c25db9bb4157ec6f.tar.bz2 mana-a6623430aa11b02f93761d27c25db9bb4157ec6f.tar.xz mana-a6623430aa11b02f93761d27c25db9bb4157ec6f.zip |
Fixed compiler warnings
Comparison between signed and unsigned integer expressions.
Diffstat (limited to 'src/gui/status.cpp')
-rw-r--r-- | src/gui/status.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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(); } |