diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-06-19 23:20:06 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2017-06-19 23:20:06 -0300 |
commit | 85a7d5ce9ac68b30da2277cc91d4b70358f1880d (patch) | |
tree | df3d2084ee2e35008903c03178039b9c986e2d08 /src/common/Utilities/Random.cpp | |
parent | 052fc24315ace866ea1cf610e85df119b68100c9 (diff) |
Core: ported headers cleanup from master branch
Diffstat (limited to 'src/common/Utilities/Random.cpp')
-rw-r--r-- | src/common/Utilities/Random.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/Utilities/Random.cpp b/src/common/Utilities/Random.cpp index 3a0cdedcf4b..890ba1b8fce 100644 --- a/src/common/Utilities/Random.cpp +++ b/src/common/Utilities/Random.cpp @@ -16,7 +16,6 @@ */ #include "Random.h" -#include "Common.h" #include "Errors.h" #include "SFMT.h" #include <boost/thread/tss.hpp> @@ -53,8 +52,8 @@ uint32 urand(uint32 min, uint32 max) uint32 urandms(uint32 min, uint32 max) { ASSERT(max >= min); - ASSERT(INT_MAX / IN_MILLISECONDS >= max); - return GetRng()->URandom(min * IN_MILLISECONDS, max * IN_MILLISECONDS); + ASSERT(std::numeric_limits<uint32>::max() / Milliseconds::period::den >= max); + return GetRng()->URandom(min * Milliseconds::period::den, max * Milliseconds::period::den); } float frand(float min, float max) |