aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/randomization.hpp
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/interfaces/randomization.hpp
parentdbab54ebf134b6ab2cf719d7c26a191fbffeed34 (diff)
perf: add noexcept almost everywhere
Diffstat (limited to 'src/interfaces/randomization.hpp')
-rw-r--r--src/interfaces/randomization.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interfaces/randomization.hpp b/src/interfaces/randomization.hpp
index 524069a..f290d5c 100644
--- a/src/interfaces/randomization.hpp
+++ b/src/interfaces/randomization.hpp
@@ -5,9 +5,9 @@
class ISeedGenerator
{
public:
- virtual ~ISeedGenerator() = default;
+ virtual ~ISeedGenerator() noexcept = default;
- [[nodiscard]] virtual uint32_t random_seed() const = 0;
+ [[nodiscard]] virtual uint32_t random_seed() const noexcept = 0;
};
using ISeedGeneratorFactory = std::shared_ptr<ISeedGenerator> (*)();
@@ -18,7 +18,7 @@ using ISeedGeneratorFactory = std::shared_ptr<ISeedGenerator> (*)();
class IRandomNumberGenerator
{
public:
- virtual ~IRandomNumberGenerator() = default;
+ virtual ~IRandomNumberGenerator() noexcept = default;
/**
* Returns a number in the range of a to b.
@@ -27,7 +27,7 @@ public:
* @param b A number greater than a
*/
[[nodiscard]] virtual uint32_t in_range(const uint32_t &a,
- const uint32_t &b) const = 0;
+ const uint32_t &b) const noexcept = 0;
};
using IRandomNumberGeneratorFactory =