summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-14 01:51:58 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-14 01:51:58 +0200
commitaaa083c0a1f1c47271aef8b11456e1e924cfa519 (patch)
tree31e6bfd6c89ee2ed1a757816947ad09bdc0d0283 /src
parent3be9741135fb25a773401466a0b303c4542acff2 (diff)
downloadmanaplus-aaa083c0a1f1c47271aef8b11456e1e924cfa519.tar.gz
manaplus-aaa083c0a1f1c47271aef8b11456e1e924cfa519.tar.bz2
manaplus-aaa083c0a1f1c47271aef8b11456e1e924cfa519.tar.xz
manaplus-aaa083c0a1f1c47271aef8b11456e1e924cfa519.zip
Small optimisation in itemcontainer.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/itemcontainer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index d25e4baa1..f4e2792ef 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -468,13 +468,13 @@ void ItemContainer::updateMatrix()
break;
}
- for (unsigned idx = 0; idx < sortedItems.size(); idx ++)
+ std::vector<ItemIdPair*>::iterator iter;
+ for (iter = sortedItems.begin(); iter != sortedItems.end(); ++iter)
{
- int itemIndex = idx;
if (j >= mGridRows)
break;
- mShowMatrix[j * mGridColumns + i] = sortedItems[itemIndex]->mId;
+ mShowMatrix[j * mGridColumns + i] = (*iter)->mId;
i ++;
if (i >= mGridColumns)