diff options
Diffstat (limited to 'src/net/tmwa/network.cpp')
-rw-r--r-- | src/net/tmwa/network.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<Uint32>(500))); + int numReady = SDLNet_CheckSockets(set, (static_cast<uint32_t>(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<Uint16*>(mInBuffer + (pos))); + return (*reinterpret_cast<uint16_t*>(mInBuffer + (pos))); #endif } |