"examples/vscode:/vscode.git/clone" did not exist on "3be99bc4df800d27708427fe7ac207baa64dbed7"
Commit a7392ca9 authored by Paul's avatar Paul
Browse files

Fix tidy issue

parent c7b2d0ae
...@@ -265,6 +265,11 @@ struct argument_parser ...@@ -265,6 +265,11 @@ struct argument_parser
return nullptr; return nullptr;
return std::addressof(*it); return std::addressof(*it);
} }
template <class F>
bool has_argument(F f)
{
return find_argument(f) != nullptr;
}
MIGRAPHX_DRIVER_STATIC auto show_help(const std::string& msg = "") MIGRAPHX_DRIVER_STATIC auto show_help(const std::string& msg = "")
{ {
...@@ -414,7 +419,7 @@ struct argument_parser ...@@ -414,7 +419,7 @@ struct argument_parser
std::cout << " " << exe_name << " "; std::cout << " " << exe_name << " ";
show_usage(); show_usage();
std::cout << std::endl; std::cout << std::endl;
if(find_argument([](const auto& a) { return contains(a.flags, "--help"); })) if(has_argument([](const auto& a) { return contains(a.flags, "--help"); }))
{ {
std::cout << std::endl; std::cout << std::endl;
std::cout << "For more information try '" << color::fg_green << "--help" << color::reset std::cout << "For more information try '" << color::fg_green << "--help" << color::reset
......
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