diff options
Diffstat (limited to 'src/resources/inventory')
-rw-r--r-- | src/resources/inventory/complexinventory.cpp | 4 | ||||
-rw-r--r-- | src/resources/inventory/inventory.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/resources/inventory/complexinventory.cpp b/src/resources/inventory/complexinventory.cpp index 5264406cb..60f6092e6 100644 --- a/src/resources/inventory/complexinventory.cpp +++ b/src/resources/inventory/complexinventory.cpp @@ -52,7 +52,7 @@ bool ComplexInventory::addVirtualItem(const Item *const item, ComplexItem *citem = nullptr; if (mItems[index] != nullptr) { - Item *const item2 = mItems[index]; + const Item *const item2 = mItems[index]; if (item->getId() != item2->getId() || item->getColor() != item2->getColor()) { // not same id or color @@ -132,7 +132,7 @@ void ComplexInventory::setItem(const int index, return; } - Item *const item1 = mItems[index]; + const Item *const item1 = mItems[index]; if (!item1 && id > 0) { ComplexItem *const item = new ComplexItem(id, diff --git a/src/resources/inventory/inventory.cpp b/src/resources/inventory/inventory.cpp index f7f6dcaee..efcea0f55 100644 --- a/src/resources/inventory/inventory.cpp +++ b/src/resources/inventory/inventory.cpp @@ -229,7 +229,8 @@ bool Inventory::contains(const Item *const item) const int Inventory::getFreeSlot() const { - Item **const i = std::find_if(mItems, mItems + mSize, + Item *const *const i = std::find_if(mItems, + mItems + mSize, std::not1(SlotUsed())); return (i == mItems + mSize) ? -1 : CAST_S32(i - mItems); |