diff options
author | HampusM <hampus@hampusmat.com> | 2022-06-27 20:44:07 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-27 20:44:07 +0200 |
commit | 9d0fe1b42c9f6a5c09bab444966d347a71a4b905 (patch) | |
tree | 6a5f282e2fcae5ef3fd987e25ad5f6e6fc95169d /src | |
parent | 837c8e8f5224dbc0e8b7b36d3e389482e8553e9f (diff) |
refactor: remove unused cursor controller method ensure_position
Diffstat (limited to 'src')
-rw-r--r-- | src/engine/user/cursor.cpp | 13 | ||||
-rw-r--r-- | src/engine/user/cursor.hpp | 2 | ||||
-rw-r--r-- | src/interfaces/cursor.hpp | 2 |
3 files changed, 0 insertions, 17 deletions
diff --git a/src/engine/user/cursor.cpp b/src/engine/user/cursor.cpp index b38cee0..e3ad56c 100644 --- a/src/engine/user/cursor.cpp +++ b/src/engine/user/cursor.cpp @@ -53,19 +53,6 @@ auto CursorController::where() const noexcept -> Vector2 return _position; } -void CursorController::ensure_position() noexcept -{ - fmt::print(REQUEST_CURSOR_POSITION, fmt::arg("esc", ESC)); - std::cout.flush(); - - Vector2Options vector2_options = {}; - - // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg) - scanf("\033[%u;%uR", &vector2_options.y, &vector2_options.x); - - _position = _invert_position_y(Vector2(vector2_options)); -} - void CursorController::update_position(const Vector2 &position) noexcept { _position = position; diff --git a/src/engine/user/cursor.hpp b/src/engine/user/cursor.hpp index 16d37e3..8f352ef 100644 --- a/src/engine/user/cursor.hpp +++ b/src/engine/user/cursor.hpp @@ -46,8 +46,6 @@ public: [[nodiscard]] auto where() const noexcept -> Vector2 override; - void ensure_position() noexcept override; - void update_position(const Vector2 &position) noexcept override; void hide(bool flush_cout) noexcept override; diff --git a/src/interfaces/cursor.hpp b/src/interfaces/cursor.hpp index 35c3047..90d45da 100644 --- a/src/interfaces/cursor.hpp +++ b/src/interfaces/cursor.hpp @@ -31,8 +31,6 @@ public: [[nodiscard]] virtual auto where() const noexcept -> Vector2 = 0; - virtual void ensure_position() noexcept = 0; - /** * Updates the stored cursor position. * |