diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-17 20:13:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-17 20:13:48 +0300 |
commit | c2efedab22275302f0a10cc197424d345a021d18 (patch) | |
tree | 7488abbb3655451a3f6a1621e0708f72011af5f6 /src/net/tmwa/messageout.cpp | |
parent | 79aba82be3de5b6b571e2f59f7a34ded4b03160f (diff) | |
download | plus-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/messageout.cpp')
-rw-r--r-- | src/net/tmwa/messageout.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net/tmwa/messageout.cpp b/src/net/tmwa/messageout.cpp index 790611381..9e9e264eb 100644 --- a/src/net/tmwa/messageout.cpp +++ b/src/net/tmwa/messageout.cpp @@ -56,29 +56,29 @@ void MessageOut::expand(size_t bytes) PacketCounters::incOutBytes(static_cast<int>(bytes)); } -void MessageOut::writeInt16(Sint16 value) +void MessageOut::writeInt16(int16_t value) { DEBUGLOG("writeInt16: " + toString(static_cast<int>(value))); expand(2); #if SDL_BYTEORDER == SDL_BIG_ENDIAN - Sint16 swap = SDL_Swap16(value); - memcpy(mData + mPos, &swap, sizeof(Sint16)); + int16_t swap = SDL_Swap16(value); + memcpy(mData + mPos, &swap, sizeof(int16_t)); #else - memcpy(mData + mPos, &value, sizeof(Sint16)); + memcpy(mData + mPos, &value, sizeof(int16_t)); #endif mPos += 2; PacketCounters::incOutBytes(2); } -void MessageOut::writeInt32(Sint32 value) +void MessageOut::writeInt32(int32_t value) { DEBUGLOG("writeInt32: " + toString(value)); expand(4); #if SDL_BYTEORDER == SDL_BIG_ENDIAN - Sint32 swap = SDL_Swap32(value); - memcpy(mData + mPos, &swap, sizeof(Sint32)); + int32_t swap = SDL_Swap32(value); + memcpy(mData + mPos, &swap, sizeof(int32_t)); #else - memcpy(mData + mPos, &value, sizeof(Sint32)); + memcpy(mData + mPos, &value, sizeof(int32_t)); #endif mPos += 4; PacketCounters::incOutBytes(4); |