diff options
Diffstat (limited to 'source/core/StarRandom.hpp')
-rw-r--r-- | source/core/StarRandom.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/core/StarRandom.hpp b/source/core/StarRandom.hpp index a67a2c5..6afb2ad 100644 --- a/source/core/StarRandom.hpp +++ b/source/core/StarRandom.hpp @@ -208,8 +208,8 @@ typename Container::value_type Random::randValueFrom( template <typename Container> void Random::shuffle(Container& container) { - size_t max = container.size(); - std::shuffle(container.begin(), container.end(), URBG<size_t>([max]() { return Random::randUInt(max - 1); })); + RandomSource random; + std::shuffle(container.begin(), container.end(), URBG<size_t>([&]() { return static_cast<size_t>(random.randu64()); })); } } |