diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-25 02:26:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-25 02:26:34 +0300 |
commit | c9f43996f3147100627ee2c6f9da993ceb160113 (patch) | |
tree | 7577f02f4658b19e05d586f66b67a9a4f5fedb7e /src/inventory.cpp | |
parent | 8e19f9b9d792cf4d3d3b022fd26a258c3d3d97bf (diff) | |
download | mv-c9f43996f3147100627ee2c6f9da993ceb160113.tar.gz mv-c9f43996f3147100627ee2c6f9da993ceb160113.tar.bz2 mv-c9f43996f3147100627ee2c6f9da993ceb160113.tar.xz mv-c9f43996f3147100627ee2c6f9da993ceb160113.zip |
Improve iterators part 2.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r-- | src/inventory.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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, |