Core: Remove the MersenneTwiser-library (SFMT is now considered stable enough for full deployment)

This commit is contained in:
click
2012-03-27 02:27:12 +02:00
parent a92820b51c
commit 6afaed4a02
9 changed files with 12 additions and 484 deletions

View File

@@ -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];