From 767b8400fb086616616a298655f0bc2eaf239256 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 8 May 2014 22:48:11 +0300 Subject: Fix code style in other files. --- src/inventory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/inventory.cpp') diff --git a/src/inventory.cpp b/src/inventory.cpp index 6213b44c9..a7adc2289 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -182,7 +182,7 @@ int Inventory::getFreeSlot() const { Item **const i = std::find_if(mItems, mItems + mSize, std::not1(SlotUsed())); - return (i == mItems + static_cast(mSize)) ? -1 + return (i == mItems + mSize) ? -1 : static_cast(i - mItems); } @@ -280,6 +280,6 @@ void Inventory::resize(const unsigned int newSize) delete [] mItems; mSize = newSize; - mItems = new Item*[mSize]; + mItems = new Item*[static_cast(mSize)]; std::fill_n(mItems, mSize, static_cast(nullptr)); } -- cgit v1.2.3-60-g2f50