aboutsummaryrefslogtreecommitdiff
path: root/src/randomization
diff options
context:
space:
mode:
Diffstat (limited to 'src/randomization')
-rw-r--r--src/randomization/generator.cpp4
-rw-r--r--src/randomization/generator.hpp4
-rw-r--r--src/randomization/seed_generator.cpp2
-rw-r--r--src/randomization/seed_generator.hpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/randomization/generator.cpp b/src/randomization/generator.cpp
index 6956eda..2febf16 100644
--- a/src/randomization/generator.cpp
+++ b/src/randomization/generator.cpp
@@ -5,8 +5,8 @@ RandomNumberGenerator::RandomNumberGenerator(const uint32_t &seed) noexcept
this->_generator = std::make_unique<std::mt19937>(seed);
}
-uint32_t RandomNumberGenerator::in_range(const uint32_t &a,
- const uint32_t &b) const noexcept
+auto RandomNumberGenerator::in_range(const uint32_t &a,
+ const uint32_t &b) const noexcept -> uint32_t
{
auto random_distribution = std::uniform_int_distribution<uint32_t>(a, b);
diff --git a/src/randomization/generator.hpp b/src/randomization/generator.hpp
index 4b002dd..98acfde 100644
--- a/src/randomization/generator.hpp
+++ b/src/randomization/generator.hpp
@@ -10,8 +10,8 @@ class RandomNumberGenerator : public IRandomNumberGenerator
public:
explicit RandomNumberGenerator(const uint32_t &seed) noexcept;
- [[nodiscard]] uint32_t in_range(const uint32_t &a,
- const uint32_t &b) const noexcept override;
+ [[nodiscard]] auto in_range(const uint32_t &a,
+ const uint32_t &b) const noexcept -> uint32_t override;
private:
std::unique_ptr<std::mt19937> _generator;
diff --git a/src/randomization/seed_generator.cpp b/src/randomization/seed_generator.cpp
index 3afa275..5aedf17 100644
--- a/src/randomization/seed_generator.cpp
+++ b/src/randomization/seed_generator.cpp
@@ -6,7 +6,7 @@ SeedGenerator::SeedGenerator(
{
}
-uint32_t SeedGenerator::random_seed() const noexcept
+auto SeedGenerator::random_seed() const noexcept -> uint32_t
{
return (*_random_device)();
}
diff --git a/src/randomization/seed_generator.hpp b/src/randomization/seed_generator.hpp
index 087ad6b..2439949 100644
--- a/src/randomization/seed_generator.hpp
+++ b/src/randomization/seed_generator.hpp
@@ -11,7 +11,7 @@ public:
explicit SeedGenerator(
const std::shared_ptr<std::random_device> &random_device) noexcept;
- [[nodiscard]] uint32_t random_seed() const noexcept override;
+ [[nodiscard]] auto random_seed() const noexcept -> uint32_t override;
private:
const std::shared_ptr<std::random_device> &_random_device;