summaryrefslogtreecommitdiff
path: root/src/terminal_ui.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2025-07-08 11:43:17 +1000
committerMaxime Coste <mawww@kakoune.org>2025-07-08 12:07:33 +1000
commitce1d512a0c1922ab5f43f28e7bae573508c98601 (patch)
tree7af8effd6b00c304cda1c87f657a0014fcdae2ae /src/terminal_ui.hh
parentfea08fc18d268ace4f843ec2b57cc33e36562098 (diff)
Replace std::unique_ptr with a custom implementation
<memory> is a costly header we can avoid by just implementing UniquePtr ourselves, which is a pretty straightforward in modern C++, this saves around 10% of the compilation time here.
Diffstat (limited to 'src/terminal_ui.hh')
-rw-r--r--src/terminal_ui.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/terminal_ui.hh b/src/terminal_ui.hh
index 064edafe..49032f6c 100644
--- a/src/terminal_ui.hh
+++ b/src/terminal_ui.hh
@@ -84,7 +84,7 @@ private:
explicit operator bool() const { return (bool)lines; }
struct Line;
- std::unique_ptr<Line[]> lines;
+ UniquePtr<Line[]> lines;
};
struct Screen : Window
@@ -92,7 +92,7 @@ private:
void output(bool force, bool synchronized, Writer& writer);
void set_face(const Face& face, Writer& writer);
- std::unique_ptr<size_t[]> hashes;
+ UniquePtr<size_t[]> hashes;
Face m_active_face;
};