aboutsummaryrefslogtreecommitdiff
path: root/src/DI/object_wrapper.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/DI/object_wrapper.hpp
parentb828d4799a84beb1afbd889e5c4cb939a8b3df78 (diff)
refactor: add factory class & make DI container return unique ptrs
Diffstat (limited to 'src/DI/object_wrapper.hpp')
-rw-r--r--src/DI/object_wrapper.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/DI/object_wrapper.hpp b/src/DI/object_wrapper.hpp
index 28121cb..6433bc2 100644
--- a/src/DI/object_wrapper.hpp
+++ b/src/DI/object_wrapper.hpp
@@ -6,12 +6,12 @@
#include <memory>
template <class Interface, class ObjectImpl>
-class ObjectWrapper : public IWrapper<std::shared_ptr<Interface>>
+class ObjectWrapper : public IWrapper<std::unique_ptr<Interface>>
{
public:
explicit ObjectWrapper(const Container &container) noexcept : _container(container) {}
- [[nodiscard]] auto get() const noexcept -> std::shared_ptr<Interface> override;
+ [[nodiscard]] auto get() const noexcept -> std::unique_ptr<Interface> override;
private:
const Container &_container;