diff options
author | Reid <reidyaro@gmail.com> | 2012-03-01 22:03:01 +0100 |
---|---|---|
committer | Reid <reidyaro@gmail.com> | 2012-03-01 22:03:01 +0100 |
commit | 490862919d79369112c75955a9c36ff8a081efd3 (patch) | |
tree | 6fe89466b9c53ba811f298174e6d787bbae71e09 /src/gui/charcreatedialog.cpp | |
parent | dff814619d63496acd3c4e8730b828b5d4d931fb (diff) | |
parent | d873da3e8e57480016596f714845c1bc7e712e68 (diff) | |
download | plus-490862919d79369112c75955a9c36ff8a081efd3.tar.gz plus-490862919d79369112c75955a9c36ff8a081efd3.tar.bz2 plus-490862919d79369112c75955a9c36ff8a081efd3.tar.xz plus-490862919d79369112c75955a9c36ff8a081efd3.zip |
Merge branch 'master' of gitorious.org:manaplus/manaplus
Diffstat (limited to 'src/gui/charcreatedialog.cpp')
-rw-r--r-- | src/gui/charcreatedialog.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp index 8d4767a15..124476f1c 100644 --- a/src/gui/charcreatedialog.cpp +++ b/src/gui/charcreatedialog.cpp @@ -270,8 +270,8 @@ void CharCreateDialog::action(const gcn::ActionEvent &event) else { new OkDialog(_("Error"), - _("Your name needs to be at least 4 characters."), - true, this); + _("Your name needs to be at least 4 characters."), + DIALOG_ERROR, true, this); } } else if (id == "cancel") @@ -474,8 +474,11 @@ void CharCreateDialog::updateHair() mHairStyle %= Being::getNumOfHairstyles(); if (mHairStyle < 0) mHairStyle += Being::getNumOfHairstyles(); - if (mHairStyle < (signed)minHairStyle || mHairStyle > (signed)maxHairStyle) + if (mHairStyle < static_cast<signed>(minHairStyle) + || mHairStyle > static_cast<signed>(maxHairStyle)) + { mHairStyle = minHairStyle; + } const ItemInfo &item = ItemDB::get(-mHairStyle); mHairStyleNameLabel->setCaption(item.getName()); mHairStyleNameLabel->adjustSize(); @@ -483,8 +486,11 @@ void CharCreateDialog::updateHair() mHairColor %= ColorDB::getHairSize(); if (mHairColor < 0) mHairColor += ColorDB::getHairSize(); - if (mHairColor < (signed)minHairColor || mHairColor > (signed)maxHairColor) + if (mHairColor < static_cast<signed>(minHairColor) + || mHairColor > static_cast<signed>(maxHairColor)) + { mHairColor = minHairColor; + } mHairColorNameLabel->setCaption(ColorDB::getHairColorName(mHairColor)); mHairColorNameLabel->adjustSize(); |