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/hook_manager.hh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/hook_manager.hh') diff --git a/src/hook_manager.hh b/src/hook_manager.hh index 97c768a3..f0b66c71 100644 --- a/src/hook_manager.hh +++ b/src/hook_manager.hh @@ -6,8 +6,7 @@ #include "meta.hh" #include "enum.hh" #include "array.hh" - -#include +#include "unique_ptr.hh" namespace Kakoune { @@ -141,10 +140,10 @@ private: friend class Scope; SafePtr m_parent; - Array, MemoryDomain::Hooks>, enum_desc(Meta::Type{}).size()> m_hooks; + Array, MemoryDomain::Hooks>, enum_desc(Meta::Type{}).size()> m_hooks; mutable Vector, MemoryDomain::Hooks> m_running_hooks; - mutable Vector, MemoryDomain::Hooks> m_hooks_trash; + mutable Vector, MemoryDomain::Hooks> m_hooks_trash; }; } -- cgit v1.2.3