From 019337908e37ffee9b624b313e9d7f885bff9781 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 15 May 2022 19:57:02 +0200 Subject: style: change braced list & bracket style --- src/engine/user/cursor.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/engine/user/cursor.cpp') 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 #include -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(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() }); + _subscribers.insert({event, std::vector()}); } _subscribers.at(event).push_back(subscriber); -- cgit v1.2.3-18-g5258