diff options
author | Nay <dnpd.dd@gmail.com> | 2013-01-04 20:49:49 +0000 |
---|---|---|
committer | Nay <dnpd.dd@gmail.com> | 2013-01-04 20:59:24 +0000 |
commit | e5945402ad4ebe92ce8311741950c126d225b6f0 (patch) | |
tree | 9d23f988707ff31714ae82932ca010a07e9414e3 /src/server/shared/Utilities/Util.cpp | |
parent | ff48ea8a52c1155e8a189cdc6de05ab79c2b74e7 (diff) |
Core/Misc: Use ASSERT (custom, better macro) instead of the C macro assert()
Diffstat (limited to 'src/server/shared/Utilities/Util.cpp')
-rw-r--r-- | src/server/shared/Utilities/Util.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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 <ace/TSS_T.h> #include <ace/INET_Addr.h> @@ -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); } |