diff options
author | click <click@gonnamakeyou.com> | 2012-03-27 02:27:12 +0200 |
---|---|---|
committer | click <click@gonnamakeyou.com> | 2012-03-27 02:27:12 +0200 |
commit | 6afaed4a02ff5e29510a9e1afffea803e02f3d69 (patch) | |
tree | ba681f09b45e1a30f2221d01a3010250bed0cb7e /src/server/shared/Utilities/Util.cpp | |
parent | a92820b51c791595676805396a599fa345d58db2 (diff) |
Core: Remove the MersenneTwiser-library (SFMT is now considered stable enough for full deployment)
Diffstat (limited to 'src/server/shared/Utilities/Util.cpp')
-rwxr-xr-x | src/server/shared/Utilities/Util.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp index 52ce74be8f8..7bedf9690ca 100755 --- a/src/server/shared/Utilities/Util.cpp +++ b/src/server/shared/Utilities/Util.cpp @@ -19,15 +19,10 @@ #include <iostream> #include "Util.h" #include "utf8.h" -#ifdef USE_SFMT_FOR_RNG #include "SFMT.h" -#else -#include "MersenneTwister.h" -#endif #include <ace/TSS_T.h> #include <ace/INET_Addr.h> -#ifdef USE_SFMT_FOR_RNG typedef ACE_TSS<SFMTRand> SFMTRandTSS; static SFMTRandTSS sfmtRand; @@ -61,41 +56,6 @@ double rand_chance(void) return sfmtRand->Random() * 100.0; } -#else -typedef ACE_TSS<MTRand> MTRandTSS; -static MTRandTSS mtRand; - -int32 irand(int32 min, int32 max) -{ - return int32(mtRand->randInt(max - min)) + min; -} - -uint32 urand(uint32 min, uint32 max) -{ - return mtRand->randInt(max - min) + min; -} - -float frand(float min, float max) -{ - return float(mtRand->randExc(max - min) + min); -} - -int32 rand32() -{ - return mtRand->randInt(); -} - -double rand_norm(void) -{ - return mtRand->randExc(); -} - -double rand_chance(void) -{ - return mtRand->randExc(100.0); -} -#endif - Tokens::Tokens(const std::string &src, const char sep, uint32 vectorReserve) { m_str = new char[src.length() + 1]; |