mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
filter: use std::move() to pass around std::string
Suggested by Coverity. Seems like a good idea. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
455bc8f40c
commit
1dade48aa6
1 changed files with 2 additions and 2 deletions
|
@ -38,13 +38,13 @@ static int filter_preset_add_to_table(const std::string name, const FilterData &
|
|||
void filter_preset_table::add(const filter_preset &preset)
|
||||
{
|
||||
std::string name = get_unique_preset_name(preset.name, *this);
|
||||
filter_preset_add_to_table(name, preset.data, *this);
|
||||
filter_preset_add_to_table(std::move(name), preset.data, *this);
|
||||
}
|
||||
|
||||
int filter_preset_table::add(const std::string &nameIn, const FilterData &d)
|
||||
{
|
||||
std::string name = get_unique_preset_name(nameIn, *this);
|
||||
return filter_preset_add_to_table(name, d, *this);
|
||||
return filter_preset_add_to_table(std::move(name), d, *this);
|
||||
}
|
||||
|
||||
void filter_preset_table::remove(int preset)
|
||||
|
|
Loading…
Add table
Reference in a new issue