Get rid of single-line if statements
Change-Id: I2b603563c650e83354af95ee6fb2fb4c9134fe86
diff --git a/src/interpreter.cpp b/src/interpreter.cpp
index cd84983..3b52960 100644
--- a/src/interpreter.cpp
+++ b/src/interpreter.cpp
@@ -100,8 +100,9 @@
std::cout << "Possible nodes:" << std::endl;
auto recursion{Recursion::NonRecursive};
for (auto it : ls.m_options) {
- if (it == LsOption::Recursive)
+ if (it == LsOption::Recursive) {
recursion = Recursion::Recursive;
+ }
}
auto toPrint = m_datastore.schema()->availableNodes(toCanonicalPath(ls.m_path), recursion);
@@ -218,12 +219,13 @@
void Interpreter::operator()(const help_& help) const
{
- if (help.m_cmd)
+ if (help.m_cmd) {
std::cout << boost::apply_visitor(commandLongHelpVisitor(), help.m_cmd.get()) << std::endl;
- else
+ } else {
boost::mpl::for_each<CommandTypes, boost::type<boost::mpl::_>>([](auto cmd) {
std::cout << commandShortHelpVisitor()(cmd) << std::endl;
});
+ }
}
template <typename PathType>