From e5945402ad4ebe92ce8311741950c126d225b6f0 Mon Sep 17 00:00:00 2001 From: Nay Date: Fri, 4 Jan 2013 20:49:49 +0000 Subject: Core/Misc: Use ASSERT (custom, better macro) instead of the C macro assert() --- src/server/shared/Utilities/Util.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/server/shared/Utilities/Util.cpp') diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp index 50fbaa799c6..0d9314c48a3 100644 --- a/src/server/shared/Utilities/Util.cpp +++ b/src/server/shared/Utilities/Util.cpp @@ -20,6 +20,7 @@ #include "Common.h" #include "utf8.h" #include "SFMT.h" +#include "Errors.h" // for ASSERT #include #include @@ -28,19 +29,19 @@ static SFMTRandTSS sfmtRand; int32 irand(int32 min, int32 max) { - assert(max >= min); + ASSERT(max >= min); return int32(sfmtRand->IRandom(min, max)); } uint32 urand(uint32 min, uint32 max) { - assert(max >= min); + ASSERT(max >= min); return sfmtRand->URandom(min, max); } float frand(float min, float max) { - assert(max >= min); + ASSERT(max >= min); return float(sfmtRand->Random() * (max - min) + min); } -- cgit v1.2.3