[Scummvm-cvs-logs] CVS: tools util.h,1.11,1.12
Max Horn
fingolfin at users.sourceforge.net
Sun Jan 18 12:26:01 CET 2004
Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1:/tmp/cvs-serv16784
Modified Files:
util.h
Log Message:
fix warnings
Index: util.h
===================================================================
RCS file: /cvsroot/scummvm/tools/util.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- util.h 10 Jan 2004 07:43:51 -0000 1.11
+++ util.h 18 Jan 2004 20:25:02 -0000 1.12
@@ -62,12 +62,17 @@
#define ARRAYSIZE(x) ((int)(sizeof(x) / sizeof(x[0])))
-static uint32 SWAP_32(uint32 a) {
+/* If your C compiler doesn't support 'inline', please add a check for it. */
+#if defined(CHECK_FOR_OLD_C_COMPILER)
+#define inline
+#endif
+
+static inline uint32 SWAP_32(uint32 a) {
return ((a >> 24) & 0xFF) + ((a >> 8) & 0xFF00) + ((a << 8) & 0xFF0000) +
((a << 24) & 0xFF000000);
}
-static uint16 SWAP_16(uint16 a) {
+static inline uint16 SWAP_16(uint16 a) {
return ((a >> 8) & 0xFF) + ((a << 8) & 0xFF00);
}
More information about the Scummvm-git-logs
mailing list