From db6edcd473a684420e9a7611b24462df21165c1b Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 24 Apr 2022 17:13:52 +0200 Subject: style: improve function and brace styling --- src/bootstrap.cpp | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) (limited to 'src/bootstrap.cpp') diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp index 22fe472..f36bc6a 100644 --- a/src/bootstrap.cpp +++ b/src/bootstrap.cpp @@ -49,9 +49,11 @@ auto bootstrap() noexcept -> Container container.bind().to(); container.bind().to_factory( - [&container](const std::shared_ptr &window, - const std::shared_ptr &scene, - const std::shared_ptr &cursor_controller) + [&container]( + const std::shared_ptr &window, + const std::shared_ptr &scene, + const std::shared_ptr &cursor_controller + ) { std::shared_ptr statusline = container.get()(cursor_controller, window); @@ -62,50 +64,65 @@ auto bootstrap() noexcept -> Container std::shared_ptr status_updater = container.get()(statusline, generation_tracker); - return std::make_unique(window, scene, cursor_controller, statusline, - generation_tracker, status_updater); - }); + return std::make_unique( + window, + scene, + cursor_controller, + statusline, + generation_tracker, + status_updater + ); + } + ); container.bind().to_factory( [](const uint32_t &seed) { return std::make_unique(seed); - }); + } + ); container.bind>().to_factory( [](const Bounds &bounds) { return std::make_unique>(bounds); - }); + } + ); container.bind().to_factory( - [&container](const std::shared_ptr &cursor_controller, - const std::shared_ptr &window) + [&container]( + const std::shared_ptr &cursor_controller, + const std::shared_ptr &window + ) { auto matrix_factory = container.get>(); return std::make_unique(matrix_factory, cursor_controller, window); - }); + } + ); container.bind().to_factory( [](const std::shared_ptr &cursor_controller, const std::shared_ptr &window) { return std::make_unique(cursor_controller, window); - }); + } + ); container.bind().to_factory( [](const std::shared_ptr &statusline, const std::shared_ptr &generation_tracker) { return std::make_unique(statusline, generation_tracker); - }); + } + ); container.bind().to_factory( [](bool is_paused) { return std::make_unique(is_paused); - }); + } + ); return container; } -- cgit v1.2.3-18-g5258