From b36d072ad7a7b9c6e30fcb25d6bbb001a8393468 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 10 Apr 2022 17:20:49 +0200 Subject: refactor: add factory class & make DI container return unique ptrs --- src/interfaces/status_updater.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/interfaces/status_updater.hpp') diff --git a/src/interfaces/status_updater.hpp b/src/interfaces/status_updater.hpp index 2770d5e..e5081ef 100644 --- a/src/interfaces/status_updater.hpp +++ b/src/interfaces/status_updater.hpp @@ -4,6 +4,7 @@ #include "interfaces/statusline.hpp" #include "interfaces/subscriber.hpp" +#include "DI/factory.hpp" #include "engine/data/vector2.hpp" #include @@ -15,6 +16,6 @@ public: void update(const Vector2 &context) noexcept override = 0; }; -using IStatusUpdaterFactory = std::shared_ptr (*)( +using IStatusUpdaterFactory = Factory( const std::shared_ptr &statusline, - const std::shared_ptr &generation_tracker); + const std::shared_ptr &generation_tracker)>; -- cgit v1.2.3-18-g5258