From 81db0022e50e25d922ac7d67d9ec6017b8856f13 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 25 Feb 2012 21:28:51 +0300 Subject: Fix old casts. --- src/gui/charcreatedialog.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/gui/charcreatedialog.cpp') 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(minHairStyle) + || mHairStyle > static_cast(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(minHairColor) + || mHairColor > static_cast(maxHairColor)) + { mHairColor = minHairColor; + } mHairColorNameLabel->setCaption(ColorDB::getHairColorName(mHairColor)); mHairColorNameLabel->adjustSize(); -- cgit v1.2.3-70-g09d2