fix more push vs emplace calls
It seems like clang-tidy doesn't catch every place that an emplace could
be used instead of a push. Use a few grep/sed pairs to find and fix up
some common patterns.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I93eaec26b8e3be240599e92b66cf54947073dc4c
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index 1319eca..819a788 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -542,7 +542,7 @@
nlohmann::json::object_t step;
step["Target"] = (*keys)[ii];
step["Output"] = (*values)[ii];
- steps.push_back(std::move(step));
+ steps.emplace_back(std::move(step));
}
}
}
@@ -592,7 +592,7 @@
itemCopy)
.to_string());
input["@odata.id"] = std::move(managerUrl);
- data.push_back(std::move(input));
+ data.emplace_back(std::move(input));
}
}
// todo(james): may never happen, but this