diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-01-20 20:43:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-01-20 23:48:07 +0300 |
commit | 2744e4fa8f39cd06bfe557a5a3881830bd11501c (patch) | |
tree | 2ec96c6ee820cfe0e5e76480fe828501bf555a4b /src/gui/widgets/itemcontainer.cpp | |
parent | 531433248fbad49e2b8e9d90de9855f3ea9b2257 (diff) | |
download | mv-2744e4fa8f39cd06bfe557a5a3881830bd11501c.tar.gz mv-2744e4fa8f39cd06bfe557a5a3881830bd11501c.tar.bz2 mv-2744e4fa8f39cd06bfe557a5a3881830bd11501c.tar.xz mv-2744e4fa8f39cd06bfe557a5a3881830bd11501c.zip |
Last part with FOR_EACH changes.
Diffstat (limited to 'src/gui/widgets/itemcontainer.cpp')
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 42c9bafcf..e11e27fd6 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -354,9 +354,7 @@ Item *ItemContainer::getSelectedItem() const void ItemContainer::distributeValueChangedEvent() { - for (SelectionListenerIterator i = mSelectionListeners.begin(), - i_end = mSelectionListeners.end(); - i != i_end; ++i) + FOR_EACH (SelectionListenerIterator, i, mSelectionListeners) { if (*i) { @@ -576,8 +574,7 @@ void ItemContainer::updateMatrix() int jMult = j * mGridColumns; const int maxSize = mGridRows * mGridColumns; - for (std::vector<ItemIdPair*>::const_iterator iter = sortedItems.begin(), - iter_end = sortedItems.end(); iter != iter_end; ++ iter) + FOR_EACH (std::vector<ItemIdPair*>::const_iterator, iter, sortedItems) { if (jMult >= maxSize) break; @@ -593,11 +590,8 @@ void ItemContainer::updateMatrix() } } - for (int idx = j * mGridColumns + i; - idx < maxSize; idx ++) - { + for (int idx = j * mGridColumns + i; idx < maxSize; idx ++) mShowMatrix[idx] = -1; - } for (size_t idx = 0, sz = sortedItems.size(); idx < sz; idx ++) delete sortedItems[idx]; |