diff options
author | HampusM <hampus@hampusmat.com> | 2022-06-28 19:22:06 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-28 19:22:06 +0200 |
commit | d2a76bd8cfd883070259bf572a9f723a37c0d96e (patch) | |
tree | cca72b471b0c3a562789a1ab966e4568edf7165a /src/engine/user | |
parent | daf39f75d764449f18cd480b6d3c645b8372b0a5 (diff) |
refactor: improve includes with iwyu
Diffstat (limited to 'src/engine/user')
-rw-r--r-- | src/engine/user/cursor.cpp | 5 | ||||
-rw-r--r-- | src/engine/user/cursor.hpp | 16 | ||||
-rw-r--r-- | src/engine/user/input.cpp | 5 | ||||
-rw-r--r-- | src/engine/user/input.hpp | 3 |
4 files changed, 14 insertions, 15 deletions
diff --git a/src/engine/user/cursor.cpp b/src/engine/user/cursor.cpp index a372ca7..5cd74a6 100644 --- a/src/engine/user/cursor.cpp +++ b/src/engine/user/cursor.cpp @@ -1,10 +1,9 @@ #include "cursor.hpp" -#include "engine/escape.hpp" - -#include <cstdlib> #include <iostream> +#include "engine/escape.hpp" + CursorController::CursorController() noexcept : _position({.x = 0, .y = 0}), _bounds({0, 0}) { diff --git a/src/engine/user/cursor.hpp b/src/engine/user/cursor.hpp index 06c6b88..ff7e89f 100644 --- a/src/engine/user/cursor.hpp +++ b/src/engine/user/cursor.hpp @@ -2,16 +2,16 @@ #include "interfaces/cursor.hpp" -#include "engine/data/bounds.hpp" -#include "engine/data/vector2.hpp" - +#include <cstdint> #include <fmt/core.h> -#include <yacppdic/auto_wirable.hpp> - #include <memory> #include <string_view> #include <unordered_map> #include <vector> +#include <yacppdic/auto_wirable.hpp> + +#include "engine/data/bounds.hpp" +#include "engine/data/vector2.hpp" constexpr std::string_view MOVE_CURSOR_UP = "{esc}[{amount}A"; constexpr std::string_view MOVE_CURSOR_DOWN = "{esc}[{amount}B"; @@ -39,8 +39,10 @@ class CursorController : public ICursorController, public: CursorController() noexcept; - void move(const Vector2 &direction, const std::uint32_t &amount, bool flush_cout) noexcept - override; + void move( + const Vector2 &direction, + const std::uint32_t &amount, + bool flush_cout) noexcept override; void move_to(const Vector2 &position, bool flush_cout) noexcept override; diff --git a/src/engine/user/input.cpp b/src/engine/user/input.cpp index f0ffbe5..505a0fa 100644 --- a/src/engine/user/input.cpp +++ b/src/engine/user/input.cpp @@ -1,11 +1,10 @@ #include "input.hpp" -#include "engine/keycodes.hpp" - #include <iostream> -#include <unistd.h> #include <unordered_map> +#include "engine/keycodes.hpp" + const std::unordered_map<char, char> special_keys_map = { {'A', keycodes::UP_ARROW}, {'B', keycodes::DOWN_ARROW}, diff --git a/src/engine/user/input.hpp b/src/engine/user/input.hpp index 12c27ee..9e8196d 100644 --- a/src/engine/user/input.hpp +++ b/src/engine/user/input.hpp @@ -2,11 +2,10 @@ #include "interfaces/input.hpp" -#include <yacppdic/auto_wirable.hpp> - #include <memory> #include <mutex> #include <string> +#include <yacppdic/auto_wirable.hpp> class UserInputObserver : public IUserInputObserver, |