Skip to content

Commit 0cb7f76

Browse files
Fix -Wredundant-move warnings
1 parent 1e218b5 commit 0cb7f76

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/base/object-packer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ static void PackAny(const Value& value, std::string& builder)
239239
*/
240240
String icinga::PackObject(const Value& value)
241241
{
242-
std::string builder;
243-
PackAny(value, builder);
242+
String builder;
243+
PackAny(value, builder.GetData());
244244

245245
return builder;
246246
}

lib/icinga/checkable-dependency.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ std::vector<DependencyGroup::Ptr> Checkable::GetDependencyGroups() const
5151
static std::variant<Checkable*, String> GetDependencyGroupKey(const Dependency::Ptr& dependency)
5252
{
5353
if (auto redundancyGroup(dependency->GetRedundancyGroup()); !redundancyGroup.IsEmpty()) {
54-
return std::move(redundancyGroup);
54+
return redundancyGroup;
5555
}
5656

5757
return dependency->GetParent().get();

0 commit comments

Comments
 (0)