aboutsummaryrefslogtreecommitdiff
path: root/src/randomization/generator.cpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-14 18:02:18 +0100
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:56 +0200
commitdc6222611ad14a33f642396558ba84ecba9d6605 (patch)
treed759020233b66be62c5539209a03842d283b67a9 /src/randomization/generator.cpp
parentdbab54ebf134b6ab2cf719d7c26a191fbffeed34 (diff)
perf: add noexcept almost everywhere
Diffstat (limited to 'src/randomization/generator.cpp')
-rw-r--r--src/randomization/generator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/randomization/generator.cpp b/src/randomization/generator.cpp
index 56fbbf1..6956eda 100644
--- a/src/randomization/generator.cpp
+++ b/src/randomization/generator.cpp
@@ -1,11 +1,12 @@
#include "generator.hpp"
-RandomNumberGenerator::RandomNumberGenerator(const uint32_t &seed)
+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
+uint32_t RandomNumberGenerator::in_range(const uint32_t &a,
+ const uint32_t &b) const noexcept
{
auto random_distribution = std::uniform_int_distribution<uint32_t>(a, b);