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/processor.hpp b/redfish-core/lib/processor.hpp
index 205578c..1223875 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -880,7 +880,7 @@
nlohmann::json::object_t turbo;
turbo["ActiveCoreCount"] = coreCount;
turbo["MaxSpeedMHz"] = turboSpeed;
- turboArray.push_back(std::move(turbo));
+ turboArray.emplace_back(std::move(turbo));
}
}
@@ -895,7 +895,7 @@
speed["CoreCount"] = coreList.size();
speed["CoreIDs"] = coreList;
speed["BaseSpeedMHz"] = baseSpeedMhz;
- baseSpeedArray.push_back(std::move(speed));
+ baseSpeedArray.emplace_back(std::move(speed));
}
}
});