Fix undefined _ASSERT in clamp function for MSVC.

This commit is contained in:
joris 2012-04-29 13:03:36 +02:00
parent 1701030080
commit c561890502
2 changed files with 2 additions and 1 deletions

View file

@ -57,6 +57,7 @@
#pragma warning(disable:4761) /// Integral size mismatch
#pragma warning(disable:4786) /// Truncated to 255 chars
#include <stdlib.h>
#include <crtdbg.h>
#define abort() _ASSERT(0)
#include <stdio.h>
#define snprintf _snprintf

View file

@ -180,7 +180,7 @@ extern long isqrt(long num);
template <typename T>
void clamp(T* value, T minValue, T maxValue)
{
//Assert(minValue < maxValue);
Assert(minValue < maxValue);
if (*value < minValue) {
*value = minValue;