summaryrefslogtreecommitdiff
path: root/src/gui/windows/shopwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-20 21:19:35 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-20 21:19:35 +0300
commit3e8fecc9a62afff0054fa0fa23af86c8ef15a1c9 (patch)
tree2053748aba4fd1e01020effe9322757426354d28 /src/gui/windows/shopwindow.cpp
parent2577a25f8a4acf587526809fda2ded95875e1222 (diff)
downloadmv-3e8fecc9a62afff0054fa0fa23af86c8ef15a1c9.tar.gz
mv-3e8fecc9a62afff0054fa0fa23af86c8ef15a1c9.tar.bz2
mv-3e8fecc9a62afff0054fa0fa23af86c8ef15a1c9.tar.xz
mv-3e8fecc9a62afff0054fa0fa23af86c8ef15a1c9.zip
Add missing const in gui directory.
Diffstat (limited to 'src/gui/windows/shopwindow.cpp')
-rw-r--r--src/gui/windows/shopwindow.cpp8
1 files changed, 5 insertions, 3 deletions
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<ShopItem*> &oldItems = mSellShopItems->items();
std::vector<ShopItem*> items;
- Inventory *const inv = PlayerInfo::getCartInventory();
+ const Inventory *const inv = PlayerInfo::getCartInventory();
if (!inv)
return;
FOR_EACH (std::vector<ShopItem*>::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<int, ShopItem*>::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)