diff options
author | HampusM <hampus@hampusmat.com> | 2022-03-06 13:29:10 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:54 +0200 |
commit | 0854ebbc0720c1691f2de661c4ce3467b71746c6 (patch) | |
tree | 6bede8baea394711056db7109f395e71e880e03d /src/randomization/generator.cpp | |
parent | a285df324deb579d262ea7cf484de4d6b11b28e4 (diff) |
refactor: replace unsigned int with uint32_t
Diffstat (limited to 'src/randomization/generator.cpp')
-rw-r--r-- | src/randomization/generator.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/randomization/generator.cpp b/src/randomization/generator.cpp index b9bcb8a..56fbbf1 100644 --- a/src/randomization/generator.cpp +++ b/src/randomization/generator.cpp @@ -1,14 +1,13 @@ #include "generator.hpp" -RandomNumberGenerator::RandomNumberGenerator(const unsigned int &seed) +RandomNumberGenerator::RandomNumberGenerator(const uint32_t &seed) { this->_generator = std::make_unique<std::mt19937>(seed); } -unsigned int RandomNumberGenerator::in_range(const unsigned int &a, - const unsigned int &b) const +uint32_t RandomNumberGenerator::in_range(const uint32_t &a, const uint32_t &b) const { - auto random_distribution = std::uniform_int_distribution<unsigned int>(a, b); + auto random_distribution = std::uniform_int_distribution<uint32_t>(a, b); return random_distribution(*this->_generator); } |