summaryrefslogtreecommitdiff
path: root/src/net/tmwa/network.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-17 20:13:48 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-17 20:13:48 +0300
commitc2efedab22275302f0a10cc197424d345a021d18 (patch)
tree7488abbb3655451a3f6a1621e0708f72011af5f6 /src/net/tmwa/network.cpp
parent79aba82be3de5b6b571e2f59f7a34ded4b03160f (diff)
downloadplus-c2efedab22275302f0a10cc197424d345a021d18.tar.gz
plus-c2efedab22275302f0a10cc197424d345a021d18.tar.bz2
plus-c2efedab22275302f0a10cc197424d345a021d18.tar.xz
plus-c2efedab22275302f0a10cc197424d345a021d18.zip
Replace SDL int types to C++ types.
Diffstat (limited to 'src/net/tmwa/network.cpp')
-rw-r--r--src/net/tmwa/network.cpp12
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
}