diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-02 14:05:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-02 14:05:30 +0300 |
commit | 962f182fcc989ec587282e44f889188ce241ba31 (patch) | |
tree | da100971ec4952d0c56cb404862099c670bcfe0e /src/net/ea/buysellhandler.cpp | |
parent | 4df121e6dcdf53436f50ce81dd60096ce0138a2c (diff) | |
download | plus-962f182fcc989ec587282e44f889188ce241ba31.tar.gz plus-962f182fcc989ec587282e44f889188ce241ba31.tar.bz2 plus-962f182fcc989ec587282e44f889188ce241ba31.tar.xz plus-962f182fcc989ec587282e44f889188ce241ba31.zip |
Add const to more classes.
Diffstat (limited to 'src/net/ea/buysellhandler.cpp')
-rw-r--r-- | src/net/ea/buysellhandler.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp index 8566bcab7..9cee4d434 100644 --- a/src/net/ea/buysellhandler.cpp +++ b/src/net/ea/buysellhandler.cpp @@ -139,19 +139,19 @@ void BuySellHandler::processNpcBuySellChoice(Net::MessageIn &msg) void BuySellHandler::processNpcSell(Net::MessageIn &msg, int offset) { msg.readInt16(); // length - int n_items = (msg.getLength() - 4) / 10; + const int n_items = (msg.getLength() - 4) / 10; if (n_items > 0) { - SellDialog *dialog = new SellDialog(mNpcId); + SellDialog *const dialog = new SellDialog(mNpcId); dialog->setMoney(PlayerInfo::getAttribute(PlayerInfo::MONEY)); for (int k = 0; k < n_items; k++) { - int index = msg.readInt16() - offset; - int value = msg.readInt32(); - msg.readInt32(); // OCvalue + const int index = msg.readInt16() - offset; + const int value = msg.readInt32(); + msg.readInt32(); // value - Item *item = PlayerInfo::getInventory()->getItem(index); + const Item *const item = PlayerInfo::getInventory()->getItem(index); if (item && !(item->isEquipped())) dialog->addItem(item, value); |