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/tmwa/network.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/tmwa/network.cpp')
-rw-r--r-- | src/net/tmwa/network.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index aab05c7b9..1a7a46e95 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -138,7 +138,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."); @@ -164,7 +164,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; @@ -186,7 +186,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; @@ -201,7 +201,7 @@ MessageIn Network::getNextMessage() } SDL_mutexP(mMutex); - int msgId = readWord(0); + const int msgId = readWord(0); int len; if (msgId == SMSG_SERVER_VERSION_RESPONSE) len = 10; |