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/itemhandler.cpp | |
parent | 4df121e6dcdf53436f50ce81dd60096ce0138a2c (diff) | |
download | manaverse-962f182fcc989ec587282e44f889188ce241ba31.tar.gz manaverse-962f182fcc989ec587282e44f889188ce241ba31.tar.bz2 manaverse-962f182fcc989ec587282e44f889188ce241ba31.tar.xz manaverse-962f182fcc989ec587282e44f889188ce241ba31.zip |
Add const to more classes.
Diffstat (limited to 'src/net/ea/itemhandler.cpp')
-rw-r--r-- | src/net/ea/itemhandler.cpp | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/net/ea/itemhandler.cpp b/src/net/ea/itemhandler.cpp index f4954d3d5..f216fe01a 100644 --- a/src/net/ea/itemhandler.cpp +++ b/src/net/ea/itemhandler.cpp @@ -35,14 +35,14 @@ ItemHandler::ItemHandler() void ItemHandler::processItemVisible(Net::MessageIn &msg) { - int id = msg.readInt32(); - int itemId = msg.readInt16(); - unsigned char identify = msg.readInt8(); // identify flag - int x = msg.readInt16(); - int y = msg.readInt16(); - int amount = msg.readInt16(); - int subX = msg.readInt8(); - int subY = msg.readInt8(); + const int id = msg.readInt32(); + const int itemId = msg.readInt16(); + const unsigned char identify = msg.readInt8(); // identify flag + const int x = msg.readInt16(); + const int y = msg.readInt16(); + const int amount = msg.readInt16(); + const int subX = msg.readInt8(); + const int subY = msg.readInt8(); if (actorSpriteManager) { @@ -53,14 +53,14 @@ void ItemHandler::processItemVisible(Net::MessageIn &msg) void ItemHandler::processItemDropped(Net::MessageIn &msg) { - int id = msg.readInt32(); - int itemId = msg.readInt16(); - unsigned char identify = msg.readInt8(); // identify flag - int x = msg.readInt16(); - int y = msg.readInt16(); - int subX = msg.readInt8(); - int subY = msg.readInt8(); - int amount = msg.readInt16(); + const int id = msg.readInt32(); + const int itemId = msg.readInt16(); + const unsigned char identify = msg.readInt8(); // identify flag + const int x = msg.readInt16(); + const int y = msg.readInt16(); + const int subX = msg.readInt8(); + const int subY = msg.readInt8(); + const int amount = msg.readInt16(); if (actorSpriteManager) { @@ -73,8 +73,11 @@ void ItemHandler::processItemRemove(Net::MessageIn &msg) { if (actorSpriteManager) { - if (FloorItem *item = actorSpriteManager->findItem(msg.readInt32())) + if (FloorItem *const item = actorSpriteManager + ->findItem(msg.readInt32())) + { actorSpriteManager->destroy(item); + } } } |