From c2efedab22275302f0a10cc197424d345a021d18 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 17 Jun 2012 20:13:48 +0300 Subject: Replace SDL int types to C++ types. --- src/net/tmwa/network.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/net/tmwa/network.cpp') diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index c54972253..c25774d9b 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -203,7 +203,7 @@ void Network::registerHandler(MessageHandler *handler) if (!handler) return; - for (const Uint16 *i = handler->handledMessages; *i; ++i) + for (const uint16_t *i = handler->handledMessages; *i; ++i) mMessageHandlers[*i] = handler; handler->setNetwork(this); @@ -214,7 +214,7 @@ void Network::unregisterHandler(MessageHandler *handler) if (!handler) return; - for (const Uint16 *i = handler->handledMessages; *i; ++i) + for (const uint16_t *i = handler->handledMessages; *i; ++i) mMessageHandlers.erase(*i); handler->setNetwork(nullptr); @@ -408,7 +408,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, (static_cast(500))); + int numReady = SDLNet_CheckSockets(set, (static_cast(500))); int ret; switch (numReady) { @@ -486,12 +486,12 @@ void Network::setError(const std::string &error) mState = NET_ERROR; } -Uint16 Network::readWord(int pos) +uint16_t Network::readWord(int pos) { #if SDL_BYTEORDER == SDL_BIG_ENDIAN - return SDL_Swap16((*(Uint16*)(mInBuffer + (pos)))); + return SDL_Swap16((*(uint16_t*)(mInBuffer + (pos)))); #else - return (*reinterpret_cast(mInBuffer + (pos))); + return (*reinterpret_cast(mInBuffer + (pos))); #endif } -- cgit v1.2.3-60-g2f50