From c9f43996f3147100627ee2c6f9da993ceb160113 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 25 Apr 2012 02:26:34 +0300 Subject: Improve iterators part 2. --- src/inventory.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/inventory.cpp') diff --git a/src/inventory.cpp b/src/inventory.cpp index b247b2f63..4b9a22739 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -198,10 +198,11 @@ void Inventory::removeInventoyListener(InventoryListener* listener) void Inventory::distributeSlotsChangedEvent() { - InventoryListenerList::const_iterator i = mInventoryListeners.begin(); - InventoryListenerList::const_iterator i_end = mInventoryListeners.end(); - for (; i != i_end; ++i) + for (InventoryListenerList::const_iterator i = mInventoryListeners.begin(), + i_end = mInventoryListeners.end(); i != i_end; ++i) + { (*i)->slotsChanged(this); + } } Item *Inventory::findItemBySprite(std::string spritePath, -- cgit v1.2.3-60-g2f50