Get rid of push_back in favor of emplace_back
Change-Id: I4a0096441ed725eb21e42eb9cc17a173929e3788
diff --git a/src/path_parser.hpp b/src/path_parser.hpp
index 39e2797..9fa3db1 100644
--- a/src/path_parser.hpp
+++ b/src/path_parser.hpp
@@ -178,7 +178,7 @@
if (std::holds_alternative<listElement_>(attr.m_suffix)) {
parserContext.m_tmpListPath = parserContext.currentDataPath();
auto tmpList = list_{std::get<listElement_>(attr.m_suffix).m_name};
- parserContext.m_tmpListPath.m_nodes.push_back(dataNode_{attr.m_prefix, tmpList});
+ parserContext.m_tmpListPath.m_nodes.emplace_back(attr.m_prefix, tmpList);
res = listSuffix.parse(begin, end, ctx, rctx, std::get<listElement_>(attr.m_suffix).m_keys);
@@ -284,7 +284,7 @@
dataNode_ attrNodeList;
res = incompleteDataNode<COMPLETION_MODE>{m_filterFunction}.parse(begin, end, ctx, rctx, attrNodeList);
if (res) {
- attrData.m_nodes.push_back(attrNodeList);
+ attrData.m_nodes.emplace_back(attrNodeList);
// If the trailing slash matches, no more nodes are parsed.
// That means no more completion. So, I generate them
// manually.