summaryrefslogtreecommitdiff
path: root/src/net/eathena/network.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/eathena/network.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/eathena/network.cpp')
-rw-r--r--src/net/eathena/network.cpp8
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)
{