diff --git a/deps/ox/src/ox/std/random.cpp b/deps/ox/src/ox/std/random.cpp index 247cab5a..70ca85c3 100644 --- a/deps/ox/src/ox/std/random.cpp +++ b/deps/ox/src/ox/std/random.cpp @@ -11,7 +11,10 @@ namespace ox { -RandomSeed Random::DEFAULT_SEED = {540932923848, 540932540932}; +Random::Random() { + m_seed[0] = 540932923848; + m_seed[1] = 540932540932; +} Random::Random(RandomSeed seed) { m_seed[0] = seed[0]; @@ -32,9 +35,3 @@ uint64_t Random::gen() { } } - - -uint64_t ox_rand() { - static ox::Random rand; - return rand.gen(); -} diff --git a/deps/ox/src/ox/std/random.hpp b/deps/ox/src/ox/std/random.hpp index 43d4daaf..77ce64ad 100644 --- a/deps/ox/src/ox/std/random.hpp +++ b/deps/ox/src/ox/std/random.hpp @@ -16,13 +16,14 @@ typedef uint64_t RandomSeed[2]; class Random { public: - static RandomSeed DEFAULT_SEED; private: RandomSeed m_seed; public: - Random(RandomSeed seed = DEFAULT_SEED); + Random(); + + Random(RandomSeed seed); uint64_t gen(); };