summaryrefslogtreecommitdiff
path: root/src/gui/charcreatedialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-25 21:28:51 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-25 21:46:40 +0300
commit81db0022e50e25d922ac7d67d9ec6017b8856f13 (patch)
tree0ead8c5df5b8eb00cbe5e07e2f7dc36170786846 /src/gui/charcreatedialog.cpp
parent6317f3e0c1e2c6d2e88dd99443e7f45f7bb77f44 (diff)
downloadmanaplus-81db0022e50e25d922ac7d67d9ec6017b8856f13.tar.gz
manaplus-81db0022e50e25d922ac7d67d9ec6017b8856f13.tar.bz2
manaplus-81db0022e50e25d922ac7d67d9ec6017b8856f13.tar.xz
manaplus-81db0022e50e25d922ac7d67d9ec6017b8856f13.zip
Fix old casts.
Diffstat (limited to 'src/gui/charcreatedialog.cpp')
-rw-r--r--src/gui/charcreatedialog.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp
index 8d4767a15..9f7436ad8 100644
--- a/src/gui/charcreatedialog.cpp
+++ b/src/gui/charcreatedialog.cpp
@@ -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();