diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index 0c8ac459ff..5e33d46005 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -231,7 +231,7 @@ namespace MWGui MWWorld::ContainerStoreIterator it = invStore.getSlot(slot); if (it != invStore.end() && *it == item) { - invStore._freeSlot(slot); + invStore.equip(slot, invStore.end()); return; } } diff --git a/apps/openmw/mwworld/inventorystore.cpp b/apps/openmw/mwworld/inventorystore.cpp index b38167d701..3e535793c0 100644 --- a/apps/openmw/mwworld/inventorystore.cpp +++ b/apps/openmw/mwworld/inventorystore.cpp @@ -97,13 +97,6 @@ void MWWorld::InventoryStore::equip (int slot, const ContainerStoreIterator& ite flagAsModified(); } -void MWWorld::InventoryStore::_freeSlot(int slot) -{ - mSlots[slot] = end(); - - flagAsModified(); -} - MWWorld::ContainerStoreIterator MWWorld::InventoryStore::getSlot (int slot) { if (slot<0 || slot>=static_cast (mSlots.size())) diff --git a/apps/openmw/mwworld/inventorystore.hpp b/apps/openmw/mwworld/inventorystore.hpp index 303604f4de..05fc651ee7 100644 --- a/apps/openmw/mwworld/inventorystore.hpp +++ b/apps/openmw/mwworld/inventorystore.hpp @@ -60,9 +60,6 @@ namespace MWWorld void equip (int slot, const ContainerStoreIterator& iterator); ///< \note \a iteartor can be an end-iterator - void _freeSlot(int slot); - ///< this method is dangerous, as it doesn't do re-stacking items - you probably want to use equip() - ContainerStoreIterator getSlot (int slot); void autoEquip (const MWMechanics::NpcStats& stats);