C++20: Use designated initializers
I wasn't pedantic on where to use them.
Change-Id: I0cb38d422ebb2fe274495183ffc31d60078d3245
diff --git a/src/cli-netconf.cpp b/src/cli-netconf.cpp
index 4f9275a..b70e7bc 100644
--- a/src/cli-netconf.cpp
+++ b/src/cli-netconf.cpp
@@ -32,5 +32,5 @@
"netconf",
bp::std_out > out, bp::std_in < in);
- return {std::move(ssh), std::move(in), std::move(out)};
+ return {.process = std::move(ssh), .std_in = std::move(in), .std_out = std::move(out)};
}
diff --git a/src/parser.cpp b/src/parser.cpp
index b5878bf..d37e37e 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -75,12 +75,12 @@
|| filtered.begin()->m_value == std::string{completionIterator, line.end()}
? filtered.begin()->m_suffix
: "";
- return {{filtered.begin()->m_value + suffix}, completionContext};
+ return {.m_completions = {filtered.begin()->m_value + suffix}, .m_contextLength = completionContext};
}
std::set<std::string> res;
std::transform(filtered.begin(), filtered.end(), std::inserter(res, res.end()), [](auto it) { return it.m_value; });
- return {res, completionContext};
+ return {.m_completions = res, .m_contextLength = completionContext};
}
void Parser::changeNode(const dataPath_& name)