From 17dcb835103ac05012c5a7eafa8c7702cef53390 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 11 Mar 2013 18:09:33 +0300 Subject: Add some fixes after automatic checks. --- src/gui/widgets/shopitems.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/gui/widgets/shopitems.cpp') 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::const_iterator it = mShopItems.begin(); const std::vector::const_iterator e = mShopItems.end(); while (it != e) { - item = *(it); + ShopItem *const item = *it; if (item->getId() == id && item->getColor() == color) return item; -- cgit v1.2.3-60-g2f50