Prefer emplace_back
Found by clang-tidy.
Change-Id: I33149bf98087f1e35ccb5a888831fc2db2ece7c0
diff --git a/tests/prepare.cpp b/tests/prepare.cpp
index 139ef4b..d56a488 100644
--- a/tests/prepare.cpp
+++ b/tests/prepare.cpp
@@ -28,14 +28,14 @@
SECTION("rpc")
{
input = "prepare example:fire";
- expected.m_path.m_nodes.push_back({module_{"example"}, rpcNode_{"fire"}});
+ expected.m_path.m_nodes.emplace_back(module_{"example"}, rpcNode_{"fire"});
}
SECTION("action")
{
input = "prepare example:port[name='eth0']/shutdown";
- expected.m_path.m_nodes.push_back({module_{"example"}, listElement_{"port", {{"name", std::string{"eth0"}}}}});
- expected.m_path.m_nodes.push_back({actionNode_{"shutdown"}});
+ expected.m_path.m_nodes.emplace_back(module_{"example"}, listElement_{"port", {{"name", std::string{"eth0"}}}});
+ expected.m_path.m_nodes.emplace_back(actionNode_{"shutdown"});
}
command_ command = parser.parseCommand(input, errorStream);