summaryrefslogtreecommitdiff
path: root/src/net/tmwa/npchandler.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/tmwa/npchandler.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/tmwa/npchandler.cpp')
-rw-r--r--src/net/tmwa/npchandler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp
index d68a78c8c..7b74ad91f 100644
--- a/src/net/tmwa/npchandler.cpp
+++ b/src/net/tmwa/npchandler.cpp
@@ -61,7 +61,7 @@ NpcHandler::NpcHandler() :
void NpcHandler::handleMessage(Net::MessageIn &msg)
{
- int npcId = getNpc(msg, msg.getId() == SMSG_NPC_CHOICE
+ const int npcId = getNpc(msg, msg.getId() == SMSG_NPC_CHOICE
|| msg.getId() == SMSG_NPC_MESSAGE);
if (msg.getId() != SMSG_NPC_STR_INPUT)
@@ -125,7 +125,7 @@ void NpcHandler::closeDialog(int npcId)
MessageOut outMsg(CMSG_NPC_CLOSE);
outMsg.writeInt32(npcId);
- NpcDialogs::iterator it = mNpcDialogs.find(npcId);
+ const NpcDialogs::iterator it = mNpcDialogs.find(npcId);
if (it != mNpcDialogs.end())
{
if ((*it).second.dialog)
@@ -208,7 +208,7 @@ int NpcHandler::getNpc(Net::MessageIn &msg, bool haveLength)
const int npcId = msg.readInt32();
- NpcDialogs::const_iterator diag = mNpcDialogs.find(npcId);
+ const NpcDialogs::const_iterator diag = mNpcDialogs.find(npcId);
mDialog = nullptr;
if (diag == mNpcDialogs.end())