hacky workaround for visual studio thinking unsigned and size_t are the same thing; windows version compiles again
This commit is contained in:
@@ -61,12 +61,16 @@ inline bool CLAMP( unsigned &x, unsigned l, unsigned h )
|
|||||||
else if (x < l) { x = l; return true; }
|
else if (x < l) { x = l; return true; }
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(_MSC_VER)
|
||||||
inline bool CLAMP( size_t &x, size_t l, size_t h )
|
inline bool CLAMP( size_t &x, size_t l, size_t h )
|
||||||
{
|
{
|
||||||
if (x > h) { x = h; return true; }
|
if (x > h) { x = h; return true; }
|
||||||
else if (x < l) { x = l; return true; }
|
else if (x < l) { x = l; return true; }
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
inline bool CLAMP( float &x, float l, float h )
|
inline bool CLAMP( float &x, float l, float h )
|
||||||
{
|
{
|
||||||
if (x > h) { x = h; return true; }
|
if (x > h) { x = h; return true; }
|
||||||
|
|||||||
Reference in New Issue
Block a user