summaryrefslogtreecommitdiff
path: root/src/resources/inventory
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-09 20:30:47 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-09 20:30:47 +0300
commit407de0a8d0898b28a587962e997df816cb17b6a9 (patch)
tree99a0184bb44950a900a9f093afb8887bdd148548 /src/resources/inventory
parent972fdcbd1ed61e2528c8b4c733f21a70d7f674b1 (diff)
downloadmv-407de0a8d0898b28a587962e997df816cb17b6a9.tar.gz
mv-407de0a8d0898b28a587962e997df816cb17b6a9.tar.bz2
mv-407de0a8d0898b28a587962e997df816cb17b6a9.tar.xz
mv-407de0a8d0898b28a587962e997df816cb17b6a9.zip
Fix code style.
Diffstat (limited to 'src/resources/inventory')
-rw-r--r--src/resources/inventory/inventory.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/resources/inventory/inventory.cpp b/src/resources/inventory/inventory.cpp
index 97bb255fe..df7104d03 100644
--- a/src/resources/inventory/inventory.cpp
+++ b/src/resources/inventory/inventory.cpp
@@ -492,8 +492,12 @@ void Inventory::virtualRestore(const Item *const item,
mVirtualRemove[index] -= amount;
if (mVirtualRemove[index] < 0)
mVirtualRemove.erase(index);
- if (index < 0 || index >= CAST_S32(mSize) || (mItems[index] == nullptr))
+ if (index < 0 ||
+ index >= CAST_S32(mSize) ||
+ mItems[index] == nullptr)
+ {
return;
+ }
mItems[index]->mQuantity += amount;
}
}