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/storage.hpp b/redfish-core/lib/storage.hpp
index 7182317..63f96b6 100644
--- a/redfish-core/lib/storage.hpp
+++ b/redfish-core/lib/storage.hpp
@@ -105,7 +105,7 @@
driveJson["@odata.id"] = crow::utility::urlFromPieces(
"redfish", "v1", "Systems", "system", "Storage", "1", "Drives",
object.filename());
- driveArray.push_back(std::move(driveJson));
+ driveArray.emplace_back(std::move(driveJson));
}
count = driveArray.size();
@@ -731,7 +731,7 @@
member["@odata.id"] = crow::utility::urlFromPieces(
"redfish", "v1", "Chassis", chassisId, "Drives",
leafName);
- members.push_back(std::move(member));
+ members.emplace_back(std::move(member));
// navigation links will be registered in next patch set
}
asyncResp->res.jsonValue["Members@odata.count"] = resp.size();