summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-30 00:47:20 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-30 00:47:20 +0300
commit2c8d567dfe173e6b0f652dc60f8e289c77200df2 (patch)
tree10dfeccdef82090859db3df5574c81822fc8ada6
parent1b653c7c1a3e6c5d7b2739f881ea6b11ca46cd3b (diff)
downloadplus-2c8d567dfe173e6b0f652dc60f8e289c77200df2.tar.gz
plus-2c8d567dfe173e6b0f652dc60f8e289c77200df2.tar.bz2
plus-2c8d567dfe173e6b0f652dc60f8e289c77200df2.tar.xz
plus-2c8d567dfe173e6b0f652dc60f8e289c77200df2.zip
Fix compilation warning.
-rw-r--r--src/inventory.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index c91a7411a..5ee1e34c0 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -370,7 +370,9 @@ void Inventory::addVirtualItem(const Item *const item,
if (findIndexByTag(item->getInvIndex()) != -1)
return;
- if (index >= 0 && index < mSize && mItems[index] == nullptr)
+ if (index >= 0 &&
+ index < static_cast<int>(mSize) &&
+ mItems[index] == nullptr)
{
setItem(index,
item->getId(),