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/eathena/network.cpp | |
parent | 4df121e6dcdf53436f50ce81dd60096ce0138a2c (diff) | |
download | manaplus-962f182fcc989ec587282e44f889188ce241ba31.tar.gz manaplus-962f182fcc989ec587282e44f889188ce241ba31.tar.bz2 manaplus-962f182fcc989ec587282e44f889188ce241ba31.tar.xz manaplus-962f182fcc989ec587282e44f889188ce241ba31.zip |
Add const to more classes.
Diffstat (limited to 'src/net/eathena/network.cpp')
-rw-r--r-- | src/net/eathena/network.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp index 236d80310..475aaa72e 100644 --- a/src/net/eathena/network.cpp +++ b/src/net/eathena/network.cpp @@ -160,7 +160,7 @@ void Network::dispatchMessages() { MessageIn msg = getNextMessage(); - MessageHandlerIterator iter = mMessageHandlers.find(msg.getId()); + const MessageHandlerIterator iter = mMessageHandlers.find(msg.getId()); if (msg.getLength() == 0) logger->safeError("Zero length packet received. Exiting."); @@ -186,7 +186,7 @@ bool Network::messageReady() SDL_mutexP(mMutex); if (mInSize >= 2) { - int msgId = readWord(0); + const int msgId = readWord(0); if (msgId == SMSG_SERVER_VERSION_RESPONSE) len = 10; else if (msgId == SMSG_UPDATE_HOST2) @@ -198,7 +198,7 @@ bool Network::messageReady() len = readWord(2); } - bool ret = (mInSize >= static_cast<unsigned int>(len)); + const bool ret = (mInSize >= static_cast<unsigned int>(len)); SDL_mutexV(mMutex); return ret; @@ -213,7 +213,7 @@ MessageIn Network::getNextMessage() } SDL_mutexP(mMutex); - int msgId = readWord(0); + const int msgId = readWord(0); int len = -1; if (msgId == SMSG_SERVER_VERSION_RESPONSE) { |