From ce1d512a0c1922ab5f43f28e7bae573508c98601 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 8 Jul 2025 11:43:17 +1000 Subject: Replace std::unique_ptr with a custom implementation 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. --- src/client.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/client.hh') 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; - Client(std::unique_ptr&& ui, - std::unique_ptr&& window, + Client(UniquePtr&& ui, + UniquePtr&& window, SelectionList selections, int pid, EnvVarMap env_vars, String name, @@ -88,8 +88,8 @@ private: DisplayLine generate_mode_line() const; - std::unique_ptr m_ui; - std::unique_ptr m_window; + UniquePtr m_ui; + UniquePtr m_window; const int m_pid; -- cgit v1.2.3