diff options
author | HampusM <hampus@hampusmat.com> | 2022-04-24 17:13:52 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:58 +0200 |
commit | db6edcd473a684420e9a7611b24462df21165c1b (patch) | |
tree | 9646bdb4f5f6e339a0a01873b44e0b185476ce56 /src/commands | |
parent | b36d072ad7a7b9c6e30fcb25d6bbb001a8393468 (diff) |
style: improve function and brace styling
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; |