aboutsummaryrefslogtreecommitdiff
path: root/src/random_generator.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-02-18 19:31:03 +0100
committerHampusM <hampus@hampusmat.com>2022-02-18 19:31:03 +0100
commite206dc1cf625f28149c19eb4dfcbf495ef0efbb4 (patch)
treebdcc6152dbce14f27a17b1a33814b0f8e365969f /src/random_generator.hpp
parent3e4d91b6b029374813cfd0900db1fa8984ad7aa3 (diff)
refactor: improve options of all kindsHEADmaster
Diffstat (limited to 'src/random_generator.hpp')
-rw-r--r--src/random_generator.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/random_generator.hpp b/src/random_generator.hpp
index 8788982..b4931d7 100644
--- a/src/random_generator.hpp
+++ b/src/random_generator.hpp
@@ -14,7 +14,7 @@ public:
*
* @param seed A number generation seed
*/
- explicit RandomNumberGenerator(unsigned int seed);
+ explicit RandomNumberGenerator(const unsigned int &seed);
/**
* Creates a pesudo-random number generator.
@@ -27,7 +27,8 @@ public:
* @param a A number lower than b
* @param b A number greater than a
*/
- unsigned int in_range(unsigned int a, unsigned int b);
+ [[nodiscard]] unsigned int in_range(const unsigned int &a,
+ const unsigned int &b) const;
private:
std::unique_ptr<std::mt19937> _generator;