Fix -Wredundant-move warnings

This commit is contained in:
Johannes Schmidt 2025-10-17 14:31:28 +02:00
parent 93e69ed0e8
commit 7b4697a237
2 changed files with 3 additions and 3 deletions

View file

@ -239,8 +239,8 @@ static void PackAny(const Value& value, std::string& builder)
*/
String icinga::PackObject(const Value& value)
{
std::string builder;
PackAny(value, builder);
String builder;
PackAny(value, builder.GetData());
return builder;
}

View file

@ -51,7 +51,7 @@ std::vector<DependencyGroup::Ptr> Checkable::GetDependencyGroups() const
static std::variant<Checkable*, String> GetDependencyGroupKey(const Dependency::Ptr& dependency)
{
if (auto redundancyGroup(dependency->GetRedundancyGroup()); !redundancyGroup.IsEmpty()) {
return std::move(redundancyGroup);
return redundancyGroup;
}
return dependency->GetParent().get();