summaryrefslogtreecommitdiff
path: root/src/gui/equipmentwindow.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/equipmentwindow.cpp
parent6317f3e0c1e2c6d2e88dd99443e7f45f7bb77f44 (diff)
downloadManaVerse-81db0022e50e25d922ac7d67d9ec6017b8856f13.tar.gz
ManaVerse-81db0022e50e25d922ac7d67d9ec6017b8856f13.tar.bz2
ManaVerse-81db0022e50e25d922ac7d67d9ec6017b8856f13.tar.xz
ManaVerse-81db0022e50e25d922ac7d67d9ec6017b8856f13.zip
Fix old casts.
Diffstat (limited to 'src/gui/equipmentwindow.cpp')
-rw-r--r--src/gui/equipmentwindow.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp
index 275bf19bb..89063c3dc 100644
--- a/src/gui/equipmentwindow.cpp
+++ b/src/gui/equipmentwindow.cpp
@@ -407,8 +407,11 @@ void EquipmentWindow::loadSlot(XmlNodePtr slotNode, ImageSet *imageset)
const int imageIndex = XML::getProperty(slotNode, "image", -1);
Image *image = nullptr;
- if (imageset && imageIndex >= 0 && imageIndex < (signed)imageset->size())
+ if (imageset && imageIndex >= 0 && imageIndex
+ < static_cast<signed>(imageset->size()))
+ {
image = imageset->get(imageIndex);
+ }
if (mBoxes[slot])
{
@@ -510,8 +513,11 @@ void EquipmentWindow::addBox(int idx, int x, int y, int imageIndex)
{
Image *image = nullptr;
- if (mImageSet && imageIndex >= 0 && imageIndex < (signed)mImageSet->size())
+ if (mImageSet && imageIndex >= 0 && imageIndex
+ < static_cast<signed>(mImageSet->size()))
+ {
image = mImageSet->get(imageIndex);
+ }
mBoxes[idx] = new EquipmentBox(x + getPadding(), y + getTitleBarHeight(),
image);