From 962f182fcc989ec587282e44f889188ce241ba31 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 2 Sep 2012 14:05:30 +0300 Subject: Add const to more classes. --- src/net/ea/loginhandler.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/net/ea/loginhandler.cpp') diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp index 18cc26351..09a4066e0 100644 --- a/src/net/ea/loginhandler.cpp +++ b/src/net/ea/loginhandler.cpp @@ -78,7 +78,7 @@ void LoginHandler::chooseServer(unsigned int server) if (server >= mWorlds.size() || !mWorlds[server]) return; - ServerInfo *charServer = getCharServer(); + ServerInfo *const charServer = getCharServer(); if (charServer) { if (config.getBoolValue("usePersistentIP")) @@ -130,7 +130,7 @@ void LoginHandler::clearWorlds() void LoginHandler::procecessCharPasswordResponse(Net::MessageIn &msg) { // 0: acc not found, 1: success, 2: password mismatch, 3: pass too short - int errMsg = msg.readInt8(); + const int errMsg = msg.readInt8(); // Successful pass change if (errMsg == 1) { @@ -184,7 +184,7 @@ void LoginHandler::processLoginData(Net::MessageIn &msg) clearWorlds(); - int worldCount = (msg.getLength() - 47) / 32; + const int worldCount = (msg.getLength() - 47) / 32; mToken.session_ID1 = msg.readInt32(); mToken.account_ID = msg.readInt32(); @@ -199,7 +199,7 @@ void LoginHandler::processLoginData(Net::MessageIn &msg) for (int i = 0; i < worldCount; i++) { - WorldInfo *world = new WorldInfo; + WorldInfo *const world = new WorldInfo; world->address = msg.readInt32(); world->port = msg.readInt16(); @@ -220,7 +220,7 @@ void LoginHandler::processLoginData(Net::MessageIn &msg) void LoginHandler::processLoginError(Net::MessageIn &msg) { - int code = msg.readInt8(); + const int code = msg.readInt8(); logger->log("Login::error code: %i", code); switch (code) -- cgit v1.2.3-70-g09d2