diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-01-14 01:51:58 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-01-14 01:51:58 +0200 |
commit | aaa083c0a1f1c47271aef8b11456e1e924cfa519 (patch) | |
tree | 31e6bfd6c89ee2ed1a757816947ad09bdc0d0283 | |
parent | 3be9741135fb25a773401466a0b303c4542acff2 (diff) | |
download | plus-aaa083c0a1f1c47271aef8b11456e1e924cfa519.tar.gz plus-aaa083c0a1f1c47271aef8b11456e1e924cfa519.tar.bz2 plus-aaa083c0a1f1c47271aef8b11456e1e924cfa519.tar.xz plus-aaa083c0a1f1c47271aef8b11456e1e924cfa519.zip |
Small optimisation in itemcontainer.
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 6 |
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) |