diff --git a/libs/pbd/pcg_rand.cc b/libs/pbd/pcg_rand.cc index 493667aa62..7838694582 100644 --- a/libs/pbd/pcg_rand.cc +++ b/libs/pbd/pcg_rand.cc @@ -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 ();