diff options
| author | Maxime Coste <mawww@kakoune.org> | 2025-07-08 11:43:17 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2025-07-08 12:07:33 +1000 |
| commit | ce1d512a0c1922ab5f43f28e7bae573508c98601 (patch) | |
| tree | 7af8effd6b00c304cda1c87f657a0014fcdae2ae /src/highlighter_group.cc | |
| parent | fea08fc18d268ace4f843ec2b57cc33e36562098 (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/highlighter_group.cc')
| -rw-r--r-- | src/highlighter_group.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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<StringView>& unique_ids) const hl.value->fill_unique_ids(unique_ids); } -void HighlighterGroup::add_child(String name, std::unique_ptr<Highlighter>&& hl, bool override) +void HighlighterGroup::add_child(String name, UniquePtr<Highlighter>&& hl, bool override) { if ((hl->passes() & passes()) != hl->passes()) throw runtime_error{"cannot add that highlighter to this group, passes don't match"}; |
