address performance-unnecessary-value-param
clang-tidy warns about the unnecessary copy for these params Could also potentially use std::make_unique if the Action constructor wasn't declared private?
This commit is contained in:
parent
aeddbb7f98
commit
8fa04ce651
1 changed files with 1 additions and 1 deletions
|
|
@ -1166,7 +1166,7 @@ bool KeymapperOptions::Action::SetValue(int value)
|
|||
|
||||
void KeymapperOptions::AddAction(string_view key, string_view name, string_view description, int defaultKey, std::function<void()> action, std::function<bool()> enable, int index)
|
||||
{
|
||||
actions.push_back(std::unique_ptr<Action>(new Action(key, name, description, defaultKey, action, enable, index)));
|
||||
actions.push_back(std::unique_ptr<Action>(new Action(key, name, description, defaultKey, std::move(action), std::move(enable), index)));
|
||||
}
|
||||
|
||||
void KeymapperOptions::KeyPressed(int key) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue