summaryrefslogtreecommitdiff
path: root/src/net/eathena/network.cpp
diff options
context:
space:
mode:
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)
{