aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/randomization.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-04-10 17:20:49 +0200
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:58 +0200
commitb36d072ad7a7b9c6e30fcb25d6bbb001a8393468 (patch)
tree7749fc877652bb2cf7bbd2b7c1fed5e3abe397fc /src/interfaces/randomization.hpp
parentb828d4799a84beb1afbd889e5c4cb939a8b3df78 (diff)
refactor: add factory class & make DI container return unique ptrs
Diffstat (limited to 'src/interfaces/randomization.hpp')
-rw-r--r--src/interfaces/randomization.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/interfaces/randomization.hpp b/src/interfaces/randomization.hpp
index 8b1631c..4abad1d 100644
--- a/src/interfaces/randomization.hpp
+++ b/src/interfaces/randomization.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include "DI/factory.hpp"
+
#include <memory>
// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
@@ -28,4 +30,4 @@ public:
};
using IRandomNumberGeneratorFactory =
- std::shared_ptr<IRandomNumberGenerator> (*)(const uint32_t &seed);
+ Factory<std::unique_ptr<IRandomNumberGenerator>(const uint32_t &seed)>;