summaryrefslogtreecommitdiff
path: root/src/gui/widgets/shopitems.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/shopitems.cpp')
-rw-r--r--src/gui/widgets/shopitems.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/widgets/shopitems.cpp b/src/gui/widgets/shopitems.cpp
index f97767064..22049e944 100644
--- a/src/gui/widgets/shopitems.cpp
+++ b/src/gui/widgets/shopitems.cpp
@@ -116,13 +116,11 @@ void ShopItems::clear()
ShopItem *ShopItems::findItem(const int id, const unsigned char color) const
{
- ShopItem *item;
-
std::vector<ShopItem*>::const_iterator it = mShopItems.begin();
const std::vector<ShopItem*>::const_iterator e = mShopItems.end();
while (it != e)
{
- item = *(it);
+ ShopItem *const item = *it;
if (item->getId() == id && item->getColor() == color)
return item;