Commit 30b7e786 authored by Paul's avatar Paul
Browse files

Format

parent 6cfe98a5
......@@ -377,12 +377,10 @@ struct argument_parser
};
}
template<class T>
template <class T>
void set_exe_name_to(T& x)
{
actions.push_back([&](auto& self) {
x = self.exe_name;
});
actions.push_back([&](auto& self) { x = self.exe_name; });
}
bool
......@@ -449,7 +447,7 @@ struct argument_parser
}
}
}
for(auto&& action:actions)
for(auto&& action : actions)
action(*this);
return false;
}
......
......@@ -591,14 +591,16 @@ struct main_command
auto it = std::find_if(wrong_commands.begin(), wrong_commands.end(), [](const auto& c) {
return get_commands().count(c) > 0;
});
if (it == wrong_commands.end())
if(it == wrong_commands.end())
{
std::cout << "'" << color::fg_yellow << wrong_commands.front() << color::reset << "' is not a valid command." << std::endl;
std::cout << "'" << color::fg_yellow << wrong_commands.front() << color::reset
<< "' is not a valid command." << std::endl;
std::cout << get_command_help("Available commands:") << std::endl;
}
else
{
std::cout << "command '" << color::fg_yellow << *it << color::reset << "' must be first argument" << std::endl;
std::cout << "command '" << color::fg_yellow << *it << color::reset
<< "' must be first argument" << std::endl;
std::cout << std::endl;
std::cout << color::fg_yellow << "USAGE:" << color::reset << std::endl;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment