diff options
Diffstat (limited to 'common/util.h')
-rw-r--r-- | common/util.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/util.h b/common/util.h index 7123a8e4a1..330d9d369b 100644 --- a/common/util.h +++ b/common/util.h @@ -35,7 +35,9 @@ #define MAX(a,b) (((a) > (b)) ? (a) : (b)) #endif -static inline void SWAP(int &a, int &b) { int tmp = a; a = b; b = tmp; } +template<class T> +static inline void SWAP(T &a, T &b) { T tmp = a; a = b; b = tmp; } + #define ARRAYSIZE(x) (sizeof(x) / sizeof(x[0])) int RGBMatch(byte *palette, int r, int g, int b); |