diff options
-rw-r--r-- | include/generic.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/generic.h b/include/generic.h index 0f98577..44aa291 100644 --- a/include/generic.h +++ b/include/generic.h @@ -140,12 +140,12 @@ char ** split(char * s, char t); #if defined(_WIN32) #define tolittle(x) x -static Uint32 tobig(Uint32 x) { +static inline Uint32 tobig(Uint32 x) { return (x >> 24) | ((x >> 8) & 0x0000ff00) | ((x << 8) & 0x00ff0000) | (x << 24); } #elif defined(WORDS_BIGENDIAN) #define tobig(x) x -static Uint32 tolittle(Uint32 x) { +static inline Uint32 tolittle(Uint32 x) { return (x >> 24) | ((x >> 8) & 0x0000ff00) | ((x << 8) & 0x00ff0000) | (x << 24); } #else @@ -153,7 +153,7 @@ static Uint32 tolittle(Uint32 x) { #warning Using little endian by default. #endif #define tolittle(x) x -static Uint32 tobig(Uint32 x) { +static inline Uint32 tobig(Uint32 x) { return (x >> 24) | ((x >> 8) & 0x0000ff00) | ((x << 8) & 0x00ff0000) | (x << 24); } #endif |