From 3e8fecc9a62afff0054fa0fa23af86c8ef15a1c9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 20 Feb 2016 21:19:35 +0300 Subject: Add missing const in gui directory. --- src/gui/windows/shopwindow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gui/windows/shopwindow.cpp') diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp index b927273ef..679bbc47f 100644 --- a/src/gui/windows/shopwindow.cpp +++ b/src/gui/windows/shopwindow.cpp @@ -341,7 +341,7 @@ void ShopWindow::action(const ActionEvent &event) { std::vector &oldItems = mSellShopItems->items(); std::vector items; - Inventory *const inv = PlayerInfo::getCartInventory(); + const Inventory *const inv = PlayerInfo::getCartInventory(); if (!inv) return; FOR_EACH (std::vector::iterator, it, oldItems) @@ -349,7 +349,7 @@ void ShopWindow::action(const ActionEvent &event) ShopItem *const item = *it; if (!item) continue; - Item *const cartItem = inv->findItem(item->getId(), + const Item *const cartItem = inv->findItem(item->getId(), item->getColor()); if (!cartItem) continue; @@ -623,7 +623,9 @@ void ShopWindow::saveList() const } for (std::map::const_iterator mapIt = mapItems.begin(), - mapIt_end = mapItems.end(); mapIt != mapIt_end; ++mapIt) + mapIt_fend = mapItems.end(); + mapIt != mapIt_fend; + ++mapIt) { const ShopItem *const buyItem = (*mapIt).second; if (buyItem) -- cgit v1.2.3-70-g09d2