summaryrefslogtreecommitdiff
path: root/src/net/eathena/markethandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-08 22:44:39 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-08 22:44:39 +0300
commita61ac4664d55cddb18d2d861e76629bd07676129 (patch)
tree59f5ba3ff7e65bbe94651db9ad2cf68b847d8f96 /src/net/eathena/markethandler.cpp
parentbb3a85b045a6135f7228023a7ba55fb1c9e6bd90 (diff)
downloadplus-a61ac4664d55cddb18d2d861e76629bd07676129.tar.gz
plus-a61ac4664d55cddb18d2d861e76629bd07676129.tar.bz2
plus-a61ac4664d55cddb18d2d861e76629bd07676129.tar.xz
plus-a61ac4664d55cddb18d2d861e76629bd07676129.zip
Add some missing const.
Diffstat (limited to 'src/net/eathena/markethandler.cpp')
-rw-r--r--src/net/eathena/markethandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp
index b055d574a..c019c6251 100644
--- a/src/net/eathena/markethandler.cpp
+++ b/src/net/eathena/markethandler.cpp
@@ -64,14 +64,14 @@ void MarketHandler::buyItem(const int itemId,
}
}
-void MarketHandler::buyItems(std::vector<ShopItem*> &items) const
+void MarketHandler::buyItems(const std::vector<ShopItem*> &items) const
{
int cnt = 0;
const int pairSize = 6;
- FOR_EACH (std::vector<ShopItem*>::iterator, it, items)
+ FOR_EACH (std::vector<ShopItem*>::const_iterator, it, items)
{
- ShopItem *const item = *it;
+ const ShopItem *const item = *it;
const int usedQuantity = item->getUsedQuantity();
const int type = item->getType();
if (!usedQuantity)
@@ -87,7 +87,7 @@ void MarketHandler::buyItems(std::vector<ShopItem*> &items) const
createOutPacket(CMSG_NPC_MARKET_BUY);
outMsg.writeInt16(CAST_S16(4 + pairSize * cnt), "len");
- FOR_EACH (std::vector<ShopItem*>::iterator, it, items)
+ FOR_EACH (std::vector<ShopItem*>::const_iterator, it, items)
{
ShopItem *const item = *it;
const int usedQuantity = item->getUsedQuantity();