diff options
author | HampusM <hampus@hampusmat.com> | 2022-06-23 20:16:07 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-23 20:16:07 +0200 |
commit | afa22dc6450a7f2341c432604d5e50735d6830c7 (patch) | |
tree | b2d3b9a27f8403b1b1117ae7dfef951b14b3c013 /src/interfaces | |
parent | 0f9d874b6af4698234be96de1fddad15aa882a1d (diff) |
perf: reduce cout flushing
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/cursor.hpp | 15 | ||||
-rw-r--r-- | src/interfaces/statusline.hpp | 1 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/interfaces/cursor.hpp b/src/interfaces/cursor.hpp index b09f06f..35c3047 100644 --- a/src/interfaces/cursor.hpp +++ b/src/interfaces/cursor.hpp @@ -22,10 +22,12 @@ class ICursorController public: virtual ~ICursorController() noexcept = default; - virtual void move(const Vector2 &direction, const uint32_t &amount) noexcept = 0; + virtual void move( + const Vector2 &direction, + const uint32_t &amount, + bool flush_cout = false) noexcept = 0; - // NOLINTNEXTLINE(google-default-arguments) - virtual void move_to(const Vector2 &position) noexcept = 0; + virtual void move_to(const Vector2 &position, bool flush_cout = false) noexcept = 0; [[nodiscard]] virtual auto where() const noexcept -> Vector2 = 0; @@ -38,11 +40,12 @@ public: */ virtual void update_position(const Vector2 &position) noexcept = 0; - virtual void hide() noexcept = 0; + virtual void hide(bool flush_cout = false) noexcept = 0; - virtual void show() noexcept = 0; + virtual void show(bool flush_cout = false) noexcept = 0; - virtual void set_cursor_style(CursorStyle cursor_style) noexcept = 0; + virtual void + set_cursor_style(CursorStyle cursor_style, bool flush_cout = false) noexcept = 0; virtual void set_bounds(const Bounds &bounds) noexcept = 0; }; diff --git a/src/interfaces/statusline.hpp b/src/interfaces/statusline.hpp index 0634d2e..ff6e1a9 100644 --- a/src/interfaces/statusline.hpp +++ b/src/interfaces/statusline.hpp @@ -27,7 +27,6 @@ enum StatusLineSection class IStatusLine : public IComponent { public: - // NOLINTNEXTLINE(google-default-arguments) virtual void set_section_status( StatusLineSection section, const std::string_view &status, |