From f98d003e354a1792117b7cbc771d1dd91475a156 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 18 Mar 2011 17:48:29 +0200 Subject: Fix most old style cast except manaserv and libxml2 defines. --- src/net/tmwa/network.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/net/tmwa/network.cpp') diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index ad8be300c..5beb05c20 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -257,7 +257,7 @@ void Network::flush() SDL_mutexP(mMutex); ret = SDLNet_TCP_Send(mSocket, mOutBuffer, mOutSize); - if (ret < (int)mOutSize) + if (ret < static_cast(mOutSize)) { setError("Error in SDLNet_TCP_Send(): " + std::string(SDLNet_GetError())); @@ -396,7 +396,7 @@ void Network::receive() { // TODO Try to get this to block all the time while still being able // to escape the loop - int numReady = SDLNet_CheckSockets(set, ((Uint32)500)); + int numReady = SDLNet_CheckSockets(set, (static_cast(500))); int ret; switch (numReady) { @@ -476,9 +476,9 @@ void Network::setError(const std::string &error) Uint16 Network::readWord(int pos) { #if SDL_BYTEORDER == SDL_BIG_ENDIAN - return SDL_Swap16((*(Uint16*)(mInBuffer + (pos)))); + return SDL_Swap16((*static_cast(mInBuffer + (pos)))); #else - return (*(Uint16*)(mInBuffer + (pos))); + return (*reinterpret_cast(mInBuffer + (pos))); #endif } -- cgit v1.2.3-60-g2f50