From 99996902de8d28565e3a3ae26e60e0977e209c24 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 5 Mar 2015 14:59:27 +0000 Subject: Use a IdMap for storing hooks The number of hook names is small (<20), using an UnorderedMap is overkill, and prevents using StringView for key searching. --- src/buffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/buffer.cc') diff --git a/src/buffer.cc b/src/buffer.cc index 60c9fdce..34b636f7 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -516,7 +516,7 @@ void Buffer::on_option_changed(const Option& option) option.name() + "=" + option.get_as_string()); } -void Buffer::run_hook_in_own_context(const String& hook_name, StringView param) +void Buffer::run_hook_in_own_context(StringView hook_name, StringView param) { InputHandler hook_handler({ *this, Selection{} }, Context::Flags::Transient); hooks().run_hook(hook_name, param, hook_handler.context()); -- cgit v1.2.3