From 962f182fcc989ec587282e44f889188ce241ba31 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 2 Sep 2012 14:05:30 +0300 Subject: Add const to more classes. --- src/net/eathena/buysellhandler.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/net/eathena/buysellhandler.cpp') 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); } } -- cgit v1.2.3-70-g09d2