Amend 55211b8d
(PRNG seed, use local address)
This commit is contained in:
parent
baf5a13f17
commit
b4b4745bd4
@ -25,11 +25,12 @@
|
||||
using namespace PBD;
|
||||
|
||||
PCGRand::PCGRand ()
|
||||
: _state (0)
|
||||
, _foo (0)
|
||||
{
|
||||
int foo = 0;
|
||||
uint64_t initseq = (intptr_t)&foo;
|
||||
_state = 0;
|
||||
uint64_t initseq = (intptr_t)&_foo;
|
||||
_inc = (initseq << 1) | 1;
|
||||
|
||||
rand_u32 ();
|
||||
_state += time (NULL) ^ (intptr_t)this;
|
||||
rand_u32 ();
|
||||
|
Loading…
Reference in New Issue
Block a user