From 895987a1112100a209b345eab002366fee39d7aa Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 21 Jul 2017 12:06:21 +0200 Subject: FastRandom: Remove discrepancy between arg and return value type. (#3846) --- src/FastRandom.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/FastRandom.h') diff --git a/src/FastRandom.h b/src/FastRandom.h index 77bafc217..7c3048118 100644 --- a/src/FastRandom.h +++ b/src/FastRandom.h @@ -77,8 +77,8 @@ public: /** Return a random IntType in the range [a_Min, a_Max]. */ - template - IntType RandInt(ArgType a_Min, ArgType a_Max) + template + IntType RandInt(IntType a_Min, IntType a_Max) { ASSERT( (a_Max >= a_Min) && @@ -97,8 +97,8 @@ public: /** Return a random IntType in the range [0, a_Max]. */ - template - IntType RandInt(ArgType a_Max) + template + IntType RandInt(IntType a_Max) { ASSERT((a_Max >= 0) && (a_Max <= std::numeric_limits::max())); Detail::cUniform dist(IntType(0), static_cast(a_Max)); @@ -122,8 +122,8 @@ public: /** Return a random RealType in the range [a_Min, a_Max). */ - template - RealType RandReal(ArgType a_Min, ArgType a_Max) + template + RealType RandReal(RealType a_Min, RealType a_Max) { std::uniform_real_distribution dist(a_Min, a_Max); return dist(m_Engine); @@ -134,8 +134,8 @@ public: /** Return a random RealType in the range [0, a_Max). */ - template - RealType RandReal(ArgType a_Max) + template + RealType RandReal(RealType a_Max) { std::uniform_real_distribution dist(RealType(0), a_Max); return dist(m_Engine); -- cgit v1.2.3