From a9852bd2c5a601f9f9c58b1dff60e9130587657b Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 20 Mar 2022 14:09:48 +0100 Subject: refactor: move on start & on exit details to the game class --- src/bootstrap.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/bootstrap.cpp') diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp index 0ef0584..713991d 100644 --- a/src/bootstrap.cpp +++ b/src/bootstrap.cpp @@ -36,16 +36,17 @@ Container bootstrap() noexcept auto container = Container(); container.bind().to(); - container.bind().to(); container.bind().to(); container.bind().to(); container.bind().to(); container.bind().to(); container.bind().to_factory(normalize_lambda( - [&container]() + [](const std::shared_ptr &window, const std::shared_ptr &scene, + const std::shared_ptr &cursor_controller) { - return container.get(); + return std::dynamic_pointer_cast( + std::make_shared(window, scene, cursor_controller)); })); container.bind().to_factory( -- cgit v1.2.3-18-g5258