Fix compiler warnings by not std::move()ing where redundant

This commit is contained in:
Alexander A. Klimov 2023-03-29 17:05:22 +02:00
parent 78631fa319
commit 9612de881a
3 changed files with 4 additions and 4 deletions

View file

@ -242,5 +242,5 @@ String icinga::PackObject(const Value& value)
std::string builder;
PackAny(value, builder);
return std::move(builder);
return builder;
}

View file

@ -280,7 +280,7 @@ std::unique_ptr<Expression> ConfigCompiler::Compile()
std::unique_ptr<DictExpression> expr{new DictExpression(std::move(dlist))};
expr->MakeInline();
return std::move(expr);
return expr;
}
#define scanner (context->GetScanner())

View file

@ -146,7 +146,7 @@ std::unique_ptr<Expression> ConfigCompiler::HandleInclude(const String& relative
std::unique_ptr<DictExpression> expr{new DictExpression(std::move(expressions))};
expr->MakeInline();
return std::move(expr);
return expr;
}
/**
@ -174,7 +174,7 @@ std::unique_ptr<Expression> ConfigCompiler::HandleIncludeRecursive(const String&
std::unique_ptr<DictExpression> dict{new DictExpression(std::move(expressions))};
dict->MakeInline();
return std::move(dict);
return dict;
}
void ConfigCompiler::HandleIncludeZone(const String& relativeBase, const String& tag, const String& path, const String& pattern, const String& package, std::vector<std::unique_ptr<Expression> >& expressions)