"test/vscode:/vscode.git/clone" did not exist on "1923be04f98e3721c1621f25ff9c604285acae1c"
Commit 753a5332 authored by Paul's avatar Paul
Browse files

Fix tidy warnings

parent 7767420c
...@@ -70,7 +70,7 @@ struct argument_parser ...@@ -70,7 +70,7 @@ struct argument_parser
}; };
template <class T, class... Fs> template <class T, class... Fs>
void operator()(T& x, std::vector<std::string> flags, Fs... fs) void operator()(T& x, const std::vector<std::string>& flags, Fs... fs)
{ {
arguments.push_back({flags, [&](auto&&, const std::vector<std::string>& params) { arguments.push_back({flags, [&](auto&&, const std::vector<std::string>& params) {
if(params.empty()) if(params.empty())
...@@ -168,12 +168,12 @@ struct argument_parser ...@@ -168,12 +168,12 @@ struct argument_parser
}); });
} }
MIGRAPHX_DRIVER_STATIC auto help(std::string help) MIGRAPHX_DRIVER_STATIC auto help(const std::string& help)
{ {
return [=](auto&, auto& arg) { arg.help = help; }; return [=](auto&, auto& arg) { arg.help = help; };
} }
MIGRAPHX_DRIVER_STATIC auto metavar(std::string metavar) MIGRAPHX_DRIVER_STATIC auto metavar(const std::string& metavar)
{ {
return [=](auto&, auto& arg) { arg.metavar = metavar; }; return [=](auto&, auto& arg) { arg.metavar = metavar; };
} }
...@@ -199,7 +199,7 @@ struct argument_parser ...@@ -199,7 +199,7 @@ struct argument_parser
for(auto&& flag : arg.flags) for(auto&& flag : arg.flags)
keywords[flag] = arg.nargs + 1; keywords[flag] = arg.nargs + 1;
} }
auto arg_map = generic_parse(std::move(args), [&](std::string x) { return keywords[x]; }); auto arg_map = generic_parse(std::move(args), [&](const std::string& x) { return keywords[x]; });
for(auto&& arg : arguments) for(auto&& arg : arguments)
{ {
auto flags = arg.flags; auto flags = arg.flags;
......
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