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 93b28c02df
commit 8f2f9737d3
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)