Commit a1227700 authored by Paul's avatar Paul
Browse files

Fix cppcheck errors

parent 673e8ff2
...@@ -146,6 +146,7 @@ struct run_cmd : command<run_cmd> ...@@ -146,6 +146,7 @@ struct run_cmd : command<run_cmd>
auto p = c.compile(); auto p = c.compile();
std::cout << "Allocating params ... " << std::endl; std::cout << "Allocating params ... " << std::endl;
auto m = c.params(p); auto m = c.params(p);
p.eval(m);
std::cout << p << std::endl; std::cout << p << std::endl;
} }
}; };
...@@ -176,9 +177,9 @@ struct main_command ...@@ -176,9 +177,9 @@ struct main_command
static std::string get_command_help() static std::string get_command_help()
{ {
std::string result = "Commands:\n"; std::string result = "Commands:\n";
for(const auto& p : get_commands()) return std::accumulate(get_commands().begin(), get_commands().end(), result, [](auto r, auto&& p) {
result += " " + p.first + "\n"; return r + " " + p.first + "\n";
return result; });
} }
void parse(argument_parser& ap) void parse(argument_parser& ap)
{ {
......
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