summaryrefslogtreecommitdiff
path: root/src/net/ea/chathandler.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/chathandler.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/chathandler.cpp')
-rw-r--r--src/net/ea/chathandler.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 6aea0e2f8..4d761a1ce 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -113,7 +113,7 @@ void ChatHandler::processWhisperResponse(Net::MessageIn &msg)
mSentWhispers.pop();
}
- int type = msg.readInt8();
+ const int type = msg.readInt8();
switch (type)
{
case 0x00:
@@ -147,7 +147,7 @@ void ChatHandler::processWhisperResponse(Net::MessageIn &msg)
void ChatHandler::processWhisper(Net::MessageIn &msg)
{
- int chatMsgLength = msg.readInt16() - 28;
+ const int chatMsgLength = msg.readInt16() - 28;
std::string nick = msg.readString(24);
if (chatMsgLength <= 0)
@@ -171,8 +171,8 @@ void ChatHandler::processWhisper(Net::MessageIn &msg)
if (player_relations.hasPermission(nick, PlayerRelation::WHISPER))
{
- bool tradeBot = config.getBoolValue("tradebot");
- bool showMsg = !config.getBoolValue("hideShopMessages");
+ const bool tradeBot = config.getBoolValue("tradebot");
+ const bool showMsg = !config.getBoolValue("hideShopMessages");
if (player_relations.hasPermission(nick, PlayerRelation::TRADE))
{
if (shopWindow)
@@ -255,8 +255,8 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg)
if (!actorSpriteManager)
return;
- int chatMsgLength = msg.readInt16() - 8;
- Being *being = actorSpriteManager->findBeing(msg.readInt32());
+ const int chatMsgLength = msg.readInt16() - 8;
+ Being *const being = actorSpriteManager->findBeing(msg.readInt32());
if (!being || chatMsgLength <= 0)
return;
@@ -301,7 +301,7 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg)
void ChatHandler::processChat(Net::MessageIn &msg, bool normalChat)
{
- int chatMsgLength = msg.readInt16() - 4;
+ const int chatMsgLength = msg.readInt16() - 4;
if (chatMsgLength <= 0)
return;
@@ -338,10 +338,10 @@ void ChatHandler::processChat(Net::MessageIn &msg, bool normalChat)
void ChatHandler::processMVP(Net::MessageIn &msg)
{
// Display MVP player
- int id = msg.readInt32(); // id
+ const int id = msg.readInt32(); // id
if (localChatTab && actorSpriteManager && config.getBoolValue("showMVP"))
{
- Being *being = actorSpriteManager->findBeing(id);
+ const Being *const being = actorSpriteManager->findBeing(id);
if (!being)
{
localChatTab->chatLog(_("MVP player."), BY_SERVER);
@@ -356,8 +356,8 @@ void ChatHandler::processMVP(Net::MessageIn &msg)
void ChatHandler::processIgnoreAllResponse(Net::MessageIn &msg)
{
- int action = msg.readInt8();
- int fail = msg.readInt8();
+ const int action = msg.readInt8();
+ const int fail = msg.readInt8();
if (!localChatTab)
return;