From 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Feb 2016 16:18:13 +0300 Subject: Replace most static_cast to shorter versions from defines. --- src/resources/inventory/complexinventory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/resources/inventory/complexinventory.cpp') diff --git a/src/resources/inventory/complexinventory.cpp b/src/resources/inventory/complexinventory.cpp index 06a8cf5c0..5264406cb 100644 --- a/src/resources/inventory/complexinventory.cpp +++ b/src/resources/inventory/complexinventory.cpp @@ -47,7 +47,7 @@ bool ComplexInventory::addVirtualItem(const Item *const item, if (!item || PlayerInfo::isItemProtected(item->getId())) return false; - if (index >= 0 && index < static_cast(mSize)) + if (index >= 0 && index < CAST_S32(mSize)) { ComplexItem *citem = nullptr; if (mItems[index] != nullptr) @@ -126,7 +126,7 @@ void ComplexInventory::setItem(const int index, const Equipm equipment, const Equipped equipped) { - if (index < 0 || index >= static_cast(mSize)) + if (index < 0 || index >= CAST_S32(mSize)) { logger->log("Warning: invalid inventory index: %d", index); return; -- cgit v1.2.3-70-g09d2