From ecd106e68cadab41d0f0a4131e668fb251a87a3e Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Mon, 21 Sep 2009 01:49:44 +0200 Subject: Inlining the tolittle and tobig functions. --- include/generic.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') 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 -- cgit v1.2.3