From 1dade48aa63aeccc7e6bf86807f13ed3f79bd591 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 13 Aug 2024 23:31:36 +0200 Subject: [PATCH] filter: use std::move() to pass around std::string Suggested by Coverity. Seems like a good idea. Signed-off-by: Berthold Stoeger --- core/filterpresettable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/filterpresettable.cpp b/core/filterpresettable.cpp index 0c5cf0c9c..6a545316c 100644 --- a/core/filterpresettable.cpp +++ b/core/filterpresettable.cpp @@ -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)