mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core: Remove the MersenneTwiser-library (SFMT is now considered stable enough for full deployment)
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user