summaryrefslogtreecommitdiff
path: root/src/client.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/client.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/client.hh')
-rw-r--r--src/client.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client.hh b/src/client.hh
index 43584c42..0963fae4 100644
--- a/src/client.hh
+++ b/src/client.hh
@@ -27,8 +27,8 @@ class Client final : public SafeCountable, public OptionManagerWatcher
public:
using OnExitCallback = std::function<void (int status)>;
- Client(std::unique_ptr<UserInterface>&& ui,
- std::unique_ptr<Window>&& window,
+ Client(UniquePtr<UserInterface>&& ui,
+ UniquePtr<Window>&& window,
SelectionList selections,
int pid, EnvVarMap env_vars,
String name,
@@ -88,8 +88,8 @@ private:
DisplayLine generate_mode_line() const;
- std::unique_ptr<UserInterface> m_ui;
- std::unique_ptr<Window> m_window;
+ UniquePtr<UserInterface> m_ui;
+ UniquePtr<Window> m_window;
const int m_pid;