summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-08 22:48:11 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-08 22:48:11 +0300
commit767b8400fb086616616a298655f0bc2eaf239256 (patch)
tree9d82215887c79c596127506f50daf2ed31c23d8c /src/inventory.cpp
parentcd0de3bd2668294ab3174d3b5f032fefc25fa0e8 (diff)
downloadmv-767b8400fb086616616a298655f0bc2eaf239256.tar.gz
mv-767b8400fb086616616a298655f0bc2eaf239256.tar.bz2
mv-767b8400fb086616616a298655f0bc2eaf239256.tar.xz
mv-767b8400fb086616616a298655f0bc2eaf239256.zip
Fix code style in other files.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp4
1 files changed, 2 insertions, 2 deletions
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<int>(mSize)) ? -1
+ return (i == mItems + mSize) ? -1
: static_cast<int>(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<size_t>(mSize)];
std::fill_n(mItems, mSize, static_cast<Item*>(nullptr));
}