hacky workaround for visual studio thinking unsigned and size_t are the same thing; windows version compiles again

This commit is contained in:
freem
2015-01-10 23:29:32 -06:00
parent 3be83d589c
commit ce085034f2
+4
View File
@@ -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; }