diff options
Diffstat (limited to 'src/engine/user/cursor.cpp')
-rw-r--r-- | src/engine/user/cursor.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/engine/user/cursor.cpp b/src/engine/user/cursor.cpp index 71f02da..945433b 100644 --- a/src/engine/user/cursor.cpp +++ b/src/engine/user/cursor.cpp @@ -5,7 +5,7 @@ #include <cstdlib> #include <iostream> -CursorController::CursorController() noexcept : _position({ .x = 0, .y = 0 }) {} +CursorController::CursorController() noexcept : _position({.x = 0, .y = 0}) {} void CursorController::move(const Vector2 &direction, const uint32_t &amount) noexcept { @@ -14,8 +14,7 @@ void CursorController::move(const Vector2 &direction, const uint32_t &amount) no fmt::print( fmt::runtime(direction_format.data()), fmt::arg("esc", ESC), - fmt::arg("amount", amount) - ); + fmt::arg("amount", amount)); std::cout.flush(); _position = _position.to_direction(direction, static_cast<Vector2::Value>(amount)); @@ -29,8 +28,7 @@ void CursorController::move_to(const Vector2 &position, bool silent) noexcept MOVE_CURSOR_TO, fmt::arg("esc", ESC), fmt::arg("row", position.get_y()), - fmt::arg("column", position.get_x()) - ); + fmt::arg("column", position.get_x())); std::cout.flush(); _position = position; @@ -75,12 +73,11 @@ void CursorController::show() noexcept void CursorController::subscribe( const Event &event, - const Subscriber &subscriber -) noexcept + const Subscriber &subscriber) noexcept { if (_subscribers.count(event) == 0) { - _subscribers.insert({ event, std::vector<Subscriber>() }); + _subscribers.insert({event, std::vector<Subscriber>()}); } _subscribers.at(event).push_back(subscriber); |