diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-02-25 21:28:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-02-25 21:46:40 +0300 |
commit | 81db0022e50e25d922ac7d67d9ec6017b8856f13 (patch) | |
tree | 0ead8c5df5b8eb00cbe5e07e2f7dc36170786846 /src/gui/charcreatedialog.cpp | |
parent | 6317f3e0c1e2c6d2e88dd99443e7f45f7bb77f44 (diff) | |
download | manaverse-81db0022e50e25d922ac7d67d9ec6017b8856f13.tar.gz manaverse-81db0022e50e25d922ac7d67d9ec6017b8856f13.tar.bz2 manaverse-81db0022e50e25d922ac7d67d9ec6017b8856f13.tar.xz manaverse-81db0022e50e25d922ac7d67d9ec6017b8856f13.zip |
Fix old casts.
Diffstat (limited to 'src/gui/charcreatedialog.cpp')
-rw-r--r-- | src/gui/charcreatedialog.cpp | 10 |
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(); |