diff options
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r-- | src/inventory.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp index a92a4377..2de03431 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -159,10 +159,8 @@ void Inventory::removeInventoryListener(InventoryListener* listener) void Inventory::distributeSlotsChangedEvent() { - InventoryListenerList::const_iterator i = mInventoryListeners.begin(); - InventoryListenerList::const_iterator i_end = mInventoryListeners.end(); - for (; i != i_end; i++) + for (auto inventoryListener : mInventoryListeners) { - (*i)->slotsChanged(this); + inventoryListener->slotsChanged(this); } } |