From 81db0022e50e25d922ac7d67d9ec6017b8856f13 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 25 Feb 2012 21:28:51 +0300 Subject: Fix old casts. --- src/net/messagein.cpp | 2 +- src/net/tmwa/playerhandler.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/net') diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp index 0547ed337..5d15d26ac 100644 --- a/src/net/messagein.cpp +++ b/src/net/messagein.cpp @@ -265,7 +265,7 @@ unsigned char *MessageIn::readBytes(int length) #ifdef ENABLEDEBUGLOG std::string str; for (int f = 0; f < length; f ++) - str += strprintf ("%02x", (unsigned)buf[f]); + str += strprintf ("%02x", static_cast(buf[f])); str += " "; for (int f = 0; f < length; f ++) { diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index bfe9eea42..a63af770a 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -229,7 +229,7 @@ void PlayerHandler::processOnlineList(Net::MessageIn &msg) return; } - char *start = (char*)msg.readBytes(size); + char *start = reinterpret_cast(msg.readBytes(size)); if (!start) return; @@ -265,7 +265,7 @@ void PlayerHandler::processOnlineList(Net::MessageIn &msg) gender = GENDER_FEMALE; } } - arr.push_back(new OnlinePlayer((char*)buf, + arr.push_back(new OnlinePlayer(static_cast(buf), status, level, gender, ver)); buf += strlen(buf) + 1; } -- cgit v1.2.3-70-g09d2