From bda21b100542279c7a58d1dd25ff6e3acda3d66c Mon Sep 17 00:00:00 2001 From: Duane Bailey Date: Sat, 17 Sep 2005 21:57:05 +0000 Subject: 2005-09-17 Duane Bailey * src/netmessagein.cpp, src/net/messageout.cpp, src/net/network.cpp: changed ifdefs to ifs --- src/net/messagein.cpp | 6 +++--- src/net/messageout.cpp | 4 ++-- src/net/network.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp index 77f6a54f..c4d933cc 100644 --- a/src/net/messagein.cpp +++ b/src/net/messagein.cpp @@ -25,7 +25,7 @@ #include #include -#ifdef SDL_BYTEORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_if SDL_BYTEORDER == SDL_BIG_ENDIAN_ENDIAN #include "win2mac.h" #endif @@ -55,7 +55,7 @@ MessageIn::readShort() { assert(mPos + 2 <= mLength); mPos += 2; -#ifdef SDL_BYTEORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN return DR_SwapTwoBytes(*(short*)(mData + (mPos - 2))); #else return (*(short*)(mData + (mPos - 2))); @@ -67,7 +67,7 @@ MessageIn::readLong() { assert(mPos + 4 <= mLength); mPos += 4; -#ifdef SDL_BYTEORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN return DR_SwapFourBytes(*(long*)(mData + (mPos - 4))); #else return (*(long*)(mData + (mPos - 4))); diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp index b3f74078..ed66f454 100644 --- a/src/net/messageout.cpp +++ b/src/net/messageout.cpp @@ -69,7 +69,7 @@ void MessageOut::writeByte(char value) void MessageOut::writeShort(short value) { expand(mPos + sizeof(short)); -#ifdef SDL_BYTEORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN (*(short *)(mData + mPos)) = DR_SwapTwoBytes(value); #else (*(short *)(mData + mPos)) = value; @@ -81,7 +81,7 @@ void MessageOut::writeShort(short value) void MessageOut::writeLong(long value) { expand(mPos + sizeof(long)); -#ifdef SDL_BYTEORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN (*(long *)(mData + mPos)) = DR_SwapFourBytes(value); #else (*(long *)(mData + mPos)) = value; diff --git a/src/net/network.cpp b/src/net/network.cpp index e5a0dead..570b31bb 100644 --- a/src/net/network.cpp +++ b/src/net/network.cpp @@ -30,7 +30,7 @@ #include "messagein.h" #include "../log.h" -#ifdef SDL_BYTEORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN #include "win2mac.h" #endif @@ -247,7 +247,7 @@ void flush() unsigned short readWord(int pos) { -#ifdef SDL_BYTEORDER == SDL_BIG_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN return DR_SwapTwoBytes((*(unsigned short*)(in+(pos)))); #else return (*(unsigned short *)(in+(pos))); -- cgit v1.2.3-70-g09d2