summaryrefslogtreecommitdiff
path: root/src/net/ea/itemhandler.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/ea/itemhandler.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/ea/itemhandler.cpp')
-rw-r--r--src/net/ea/itemhandler.cpp37
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);
+ }
}
}