summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2009-09-21 01:49:44 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2009-09-21 01:49:44 +0200
commitecd106e68cadab41d0f0a4131e668fb251a87a3e (patch)
tree9190a9ccde64b74cce20646ba9964c0a196046cb /include
parent6d1dee65d5ad695670d73bf3e162b4b6e984af35 (diff)
Inlining the tolittle and tobig functions.
Diffstat (limited to 'include')
-rw-r--r--include/generic.h6
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