aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-10-22 23:36:28 +0000
committerMax Horn2002-10-22 23:36:28 +0000
commit64195315e28dd0b9c20445c918f6ea4c342522ad (patch)
tree33bcb6578bd6c200704bc9890f73e7c702c7981d
parentb68ce4021413483005366e650057e29bb9b8bc63 (diff)
downloadscummvm-rg350-64195315e28dd0b9c20445c918f6ea4c342522ad.tar.gz
scummvm-rg350-64195315e28dd0b9c20445c918f6ea4c342522ad.tar.bz2
scummvm-rg350-64195315e28dd0b9c20445c918f6ea4c342522ad.zip
inline function instead of macro for SWAP, to make -Wshadow more useful
svn-id: r5263
-rw-r--r--common/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/util.h b/common/util.h
index 85ea599278..3218a8546d 100644
--- a/common/util.h
+++ b/common/util.h
@@ -35,7 +35,7 @@
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif
-#define SWAP(a,b) do{int tmp=a; a=b; b=tmp; } while(0)
+static inline void SWAP(int &a, int &b) { int tmp=a; a=b; b=tmp; }
#define ARRAYSIZE(x) (sizeof(x)/sizeof(x[0]))
#if USE_555_FORMAT