summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 555117638..e410a36ed 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -160,7 +160,8 @@ int Inventory::getFreeSlot() const
{
Item **i = std::find_if(mItems, mItems + mSize,
std::not1(SlotUsed()));
- return (i == mItems + static_cast<int>(mSize)) ? -1 : (i - mItems);
+ return (i == mItems + static_cast<int>(mSize)) ? -1
+ : static_cast<int>(i - mItems);
}
int Inventory::getLastUsedSlot() const