Fix useles copy of hook_func in HookManager::add_hook parameter

This commit is contained in:
Maxime Coste 2017-06-07 09:54:58 +01:00
parent 295fa5b27d
commit 502c5da0e9

View File

@ -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));
}
};