summaryrefslogtreecommitdiff
path: root/src/net/eathena/buysellhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-02 14:05:30 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-02 14:05:30 +0300
commit962f182fcc989ec587282e44f889188ce241ba31 (patch)
treeda100971ec4952d0c56cb404862099c670bcfe0e /src/net/eathena/buysellhandler.cpp
parent4df121e6dcdf53436f50ce81dd60096ce0138a2c (diff)
downloadplus-962f182fcc989ec587282e44f889188ce241ba31.tar.gz
plus-962f182fcc989ec587282e44f889188ce241ba31.tar.bz2
plus-962f182fcc989ec587282e44f889188ce241ba31.tar.xz
plus-962f182fcc989ec587282e44f889188ce241ba31.zip
Add const to more classes.
Diffstat (limited to 'src/net/eathena/buysellhandler.cpp')
-rw-r--r--src/net/eathena/buysellhandler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp
index 405d5f7ec..4dbc90e4b 100644
--- a/src/net/eathena/buysellhandler.cpp
+++ b/src/net/eathena/buysellhandler.cpp
@@ -101,18 +101,18 @@ void BuySellHandler::handleMessage(Net::MessageIn &msg)
void BuySellHandler::processNpcBuy(Net::MessageIn &msg)
{
msg.readInt16(); // length
- int sz = 11;
- int n_items = (msg.getLength() - 4) / sz;
+ const int sz = 11;
+ const int n_items = (msg.getLength() - 4) / sz;
mBuyDialog = new BuyDialog(mNpcId);
mBuyDialog->setMoney(PlayerInfo::getAttribute(PlayerInfo::MONEY));
for (int k = 0; k < n_items; k++)
{
- int value = msg.readInt32();
+ const int value = msg.readInt32();
msg.readInt32(); // DCvalue
msg.readInt8(); // type
- int itemId = msg.readInt16();
- unsigned char color = 1;
+ const int itemId = msg.readInt16();
+ const unsigned char color = 1;
mBuyDialog->addItem(itemId, color, 0, value);
}
}