summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-01-20 20:43:54 +0300
committerAndrei Karas <akaras@inbox.ru>2013-01-20 23:48:07 +0300
commit2744e4fa8f39cd06bfe557a5a3881830bd11501c (patch)
tree2ec96c6ee820cfe0e5e76480fe828501bf555a4b /src/gui/widgets/itemcontainer.cpp
parent531433248fbad49e2b8e9d90de9855f3ea9b2257 (diff)
downloadmanaplus-2744e4fa8f39cd06bfe557a5a3881830bd11501c.tar.gz
manaplus-2744e4fa8f39cd06bfe557a5a3881830bd11501c.tar.bz2
manaplus-2744e4fa8f39cd06bfe557a5a3881830bd11501c.tar.xz
manaplus-2744e4fa8f39cd06bfe557a5a3881830bd11501c.zip
Last part with FOR_EACH changes.
Diffstat (limited to 'src/gui/widgets/itemcontainer.cpp')
-rw-r--r--src/gui/widgets/itemcontainer.cpp12
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];