diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-03-10 18:24:44 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-03-10 18:24:44 +0100 |
commit | 30353cd2285d8d2e9ec38c1015c7d45dbdb82b39 (patch) | |
tree | 10da47f607c503a9db7dc32a1082636d11711d6a /src | |
parent | Merge branch 'master' into Werror (diff) | |
download | cuberite-30353cd2285d8d2e9ec38c1015c7d45dbdb82b39.tar cuberite-30353cd2285d8d2e9ec38c1015c7d45dbdb82b39.tar.gz cuberite-30353cd2285d8d2e9ec38c1015c7d45dbdb82b39.tar.bz2 cuberite-30353cd2285d8d2e9ec38c1015c7d45dbdb82b39.tar.lz cuberite-30353cd2285d8d2e9ec38c1015c7d45dbdb82b39.tar.xz cuberite-30353cd2285d8d2e9ec38c1015c7d45dbdb82b39.tar.zst cuberite-30353cd2285d8d2e9ec38c1015c7d45dbdb82b39.zip |
Diffstat (limited to '')
-rw-r--r-- | src/MersenneTwister.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/MersenneTwister.h b/src/MersenneTwister.h index 2c5440f17..759b8a1ae 100644 --- a/src/MersenneTwister.h +++ b/src/MersenneTwister.h @@ -72,7 +72,7 @@ protected: uint32 state[N]; // internal state uint32 *pNext; // next value to get from state - int left; // number of values left before reload needed + uint32 left; // number of values left before reload needed // Methods public: @@ -164,7 +164,7 @@ inline void MTRand::initialize( const uint32 seed ) // only MSBs of the state array. Modified 9 Jan 2002 by Makoto Matsumoto. uint32 *s = state; uint32 *r = state; - int i = 1; + uint32 i = 1; *s++ = seed & 0xffffffffUL; for( ; i < N; ++i ) { @@ -205,9 +205,9 @@ inline void MTRand::seed( uint32 *const bigSeed, const uint32 seedLength ) // in each element are discarded. // Just call seed() if you want to get array from /dev/urandom initialize(19650218UL); - int i = 1; + uint32 i = 1; uint32 j = 0; - int k = ( (uint32)N > seedLength ? (uint32)N : seedLength ); + uint32 k = ( (uint32)N > seedLength ? (uint32)N : seedLength ); for( ; k; --k ) { state[i] = |