From 502c5da0e9f1b8d683860e376d989457819353b4 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 7 Jun 2017 09:54:58 +0100 Subject: [PATCH] Fix useles copy of hook_func in HookManager::add_hook parameter --- src/commands.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands.cc b/src/commands.cc index e2314c66..835a246f 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -822,7 +822,7 @@ const CommandDesc add_hook_cmd = { } }; auto group = parser.get_switch("group").value_or(StringView{}); - get_scope(parser[0], context).hooks().add_hook(parser[1], group.str(), hook_func); + get_scope(parser[0], context).hooks().add_hook(parser[1], group.str(), std::move(hook_func)); } };