From ce085034f2de0165cbf5220030f1ca60ebbc2636 Mon Sep 17 00:00:00 2001 From: freem Date: Sat, 10 Jan 2015 23:29:32 -0600 Subject: [PATCH] hacky workaround for visual studio thinking unsigned and size_t are the same thing; windows version compiles again --- src/RageUtil.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/RageUtil.h b/src/RageUtil.h index 8cd681a048..18b1846775 100644 --- a/src/RageUtil.h +++ b/src/RageUtil.h @@ -61,12 +61,16 @@ inline bool CLAMP( unsigned &x, unsigned l, unsigned h ) else if (x < l) { x = l; return true; } return false; } + +#if !defined(_MSC_VER) inline bool CLAMP( size_t &x, size_t l, size_t h ) { if (x > h) { x = h; return true; } else if (x < l) { x = l; return true; } return false; } +#endif + inline bool CLAMP( float &x, float l, float h ) { if (x > h) { x = h; return true; }