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/highlighter_group.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/highlighter_group.cc') diff --git a/src/highlighter_group.cc b/src/highlighter_group.cc index 57bbd7d2..77364274 100644 --- a/src/highlighter_group.cc +++ b/src/highlighter_group.cc @@ -26,7 +26,7 @@ void HighlighterGroup::fill_unique_ids(Vector& unique_ids) const hl.value->fill_unique_ids(unique_ids); } -void HighlighterGroup::add_child(String name, std::unique_ptr&& hl, bool override) +void HighlighterGroup::add_child(String name, UniquePtr&& hl, bool override) { if ((hl->passes() & passes()) != hl->passes()) throw runtime_error{"cannot add that highlighter to this group, passes don't match"}; -- cgit v1.2.3