From 3c404128c4669a1f4f190e20a89553677717fc50 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 23 Sep 2016 22:01:44 +0300 Subject: Add missing comments into defines. --- src/net/tmwa/messageout.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/net/tmwa/messageout.cpp') diff --git a/src/net/tmwa/messageout.cpp b/src/net/tmwa/messageout.cpp index 237d4f185..e0e7ffdb2 100644 --- a/src/net/tmwa/messageout.cpp +++ b/src/net/tmwa/messageout.cpp @@ -32,7 +32,7 @@ #ifndef SDL_BYTEORDER #error missing SDL_endian.h -#endif +#endif // SDL_BYTEORDER namespace TmwAthena { @@ -60,9 +60,11 @@ void MessageOut::writeInt16(const int16_t value, const char *const str) #if SDL_BYTEORDER == SDL_BIG_ENDIAN int16_t swap = SDL_Swap16(value); memcpy(mData + CAST_SIZE(mPos), &swap, sizeof(int16_t)); -#else +#else // SDL_BYTEORDER == SDL_BIG_ENDIAN + memcpy(mData + CAST_SIZE(mPos), &value, sizeof(int16_t)); -#endif +#endif // SDL_BYTEORDER == SDL_BIG_ENDIAN + mPos += 2; PacketCounters::incOutBytes(2); } @@ -75,9 +77,11 @@ void MessageOut::writeInt32(const int32_t value, const char *const str) #if SDL_BYTEORDER == SDL_BIG_ENDIAN int32_t swap = SDL_Swap32(value); memcpy(mData + CAST_SIZE(mPos), &swap, sizeof(int32_t)); -#else +#else // SDL_BYTEORDER == SDL_BIG_ENDIAN + memcpy(mData + CAST_SIZE(mPos), &value, sizeof(int32_t)); -#endif +#endif // SDL_BYTEORDER == SDL_BIG_ENDIAN + mPos += 4; PacketCounters::incOutBytes(4); } -- cgit v1.2.3-60-g2f50