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/messageout.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/net/tmwa/messageout.cpp') 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(bytes)); } -void MessageOut::writeInt16(Sint16 value) +void MessageOut::writeInt16(int16_t value) { DEBUGLOG("writeInt16: " + toString(static_cast(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); -- cgit v1.2.3-60-g2f50