aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities/Random.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2017-05-11 22:29:51 +0200
committerShauren <shauren.trinity@gmail.com>2017-05-11 22:29:51 +0200
commit3a418a0bbc8e155e5395595c5e25c038d3c7c773 (patch)
tree45359566bd6e360dd133e7ef43bc2a42e26baf56 /src/common/Utilities/Random.cpp
parent8abc56c540b5d2c583e40ad3d302c43068778ed1 (diff)
Core/Common: Include cleanup
Diffstat (limited to 'src/common/Utilities/Random.cpp')
-rw-r--r--src/common/Utilities/Random.cpp5
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)