diff options
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/insert_cell.cpp | 3 | ||||
-rw-r--r-- | src/commands/insert_cell.hpp | 6 | ||||
-rw-r--r-- | src/commands/move_cursor.cpp | 6 | ||||
-rw-r--r-- | src/commands/move_cursor.hpp | 8 | ||||
-rw-r--r-- | src/commands/toggle_pause.cpp | 12 | ||||
-rw-r--r-- | src/commands/toggle_pause.hpp | 6 |
6 files changed, 27 insertions, 14 deletions
diff --git a/src/commands/insert_cell.cpp b/src/commands/insert_cell.cpp index 86a5a52..3aa0fc8 100644 --- a/src/commands/insert_cell.cpp +++ b/src/commands/insert_cell.cpp @@ -4,7 +4,8 @@ InsertCellCommand::InsertCellCommand( const std::shared_ptr<ICursorController> &cursor_controller, - const std::shared_ptr<IScene> &scene) noexcept + const std::shared_ptr<IScene> &scene +) noexcept : _cursor_controller(cursor_controller), _scene(scene) { } diff --git a/src/commands/insert_cell.hpp b/src/commands/insert_cell.hpp index cf04203..7518ece 100644 --- a/src/commands/insert_cell.hpp +++ b/src/commands/insert_cell.hpp @@ -9,8 +9,10 @@ class InsertCellCommand : public ICommand { public: - InsertCellCommand(const std::shared_ptr<ICursorController> &cursor_controller, - const std::shared_ptr<IScene> &scene) noexcept; + InsertCellCommand( + const std::shared_ptr<ICursorController> &cursor_controller, + const std::shared_ptr<IScene> &scene + ) noexcept; void execute() noexcept override; diff --git a/src/commands/move_cursor.cpp b/src/commands/move_cursor.cpp index 1d2b4e8..fe2f05f 100644 --- a/src/commands/move_cursor.cpp +++ b/src/commands/move_cursor.cpp @@ -1,8 +1,10 @@ #include "move_cursor.hpp" MoveCursorCommand::MoveCursorCommand( - const Vector2 &direction, const std::shared_ptr<ICursorController> &cursor_controller, - const std::shared_ptr<IWindow> &window) noexcept + const Vector2 &direction, + const std::shared_ptr<ICursorController> &cursor_controller, + const std::shared_ptr<IWindow> &window +) noexcept : _direction(direction), _cursor_controller(cursor_controller), _window(window) { diff --git a/src/commands/move_cursor.hpp b/src/commands/move_cursor.hpp index ff4723d..88d9c42 100644 --- a/src/commands/move_cursor.hpp +++ b/src/commands/move_cursor.hpp @@ -11,9 +11,11 @@ class MoveCursorCommand : public ICommand { public: - MoveCursorCommand(const Vector2 &direction, - const std::shared_ptr<ICursorController> &cursor_controller, - const std::shared_ptr<IWindow> &window) noexcept; + MoveCursorCommand( + const Vector2 &direction, + const std::shared_ptr<ICursorController> &cursor_controller, + const std::shared_ptr<IWindow> &window + ) noexcept; void execute() noexcept override; diff --git a/src/commands/toggle_pause.cpp b/src/commands/toggle_pause.cpp index d978bc6..434330e 100644 --- a/src/commands/toggle_pause.cpp +++ b/src/commands/toggle_pause.cpp @@ -5,7 +5,8 @@ TogglePauseCommand::TogglePauseCommand( std::shared_ptr<IGenerationTracker> generation_tracker, - std::shared_ptr<IStatusLine> statusline) noexcept + std::shared_ptr<IStatusLine> statusline +) noexcept : _generation_tracker(std::move(generation_tracker)), _statusline(std::move(statusline)) { @@ -19,7 +20,10 @@ void TogglePauseCommand::execute() noexcept _statusline->set_status( StatusLineSection::B, - fmt::format("Paused: {} Generation: {}", - _generation_tracker->get_is_paused() ? "yes" : "no", - _generation_tracker->get_current_generation())); + fmt::format( + "Paused: {} Generation: {}", + _generation_tracker->get_is_paused() ? "yes" : "no", + _generation_tracker->get_current_generation() + ) + ); } diff --git a/src/commands/toggle_pause.hpp b/src/commands/toggle_pause.hpp index 4e05323..e243cc3 100644 --- a/src/commands/toggle_pause.hpp +++ b/src/commands/toggle_pause.hpp @@ -9,8 +9,10 @@ class TogglePauseCommand : public ICommand { public: - explicit TogglePauseCommand(std::shared_ptr<IGenerationTracker> generation_tracker, - std::shared_ptr<IStatusLine> statusline) noexcept; + explicit TogglePauseCommand( + std::shared_ptr<IGenerationTracker> generation_tracker, + std::shared_ptr<IStatusLine> statusline + ) noexcept; void execute() noexcept override; |