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/include/persistent_data.hpp b/include/persistent_data.hpp
index e93d216..4344074 100644
--- a/include/persistent_data.hpp
+++ b/include/persistent_data.hpp
@@ -243,7 +243,7 @@
{
session["client_id"] = *p.second->clientId;
}
- sessions.push_back(std::move(session));
+ sessions.emplace_back(std::move(session));
}
}
nlohmann::json& subscriptions = data["subscriptions"];
@@ -286,7 +286,7 @@
subscription["MetricReportDefinitions"] =
subValue->metricReportDefinitions;
- subscriptions.push_back(std::move(subscription));
+ subscriptions.emplace_back(std::move(subscription));
}
persistentFile << data;
}