From 2c8d567dfe173e6b0f652dc60f8e289c77200df2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 30 Oct 2015 00:47:20 +0300 Subject: Fix compilation warning. --- src/inventory.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/inventory.cpp') 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(mSize) && + mItems[index] == nullptr) { setItem(index, item->getId(), -- cgit v1.2.3-60-g2f50