Commit cf9d1ebb authored by aligungr's avatar aligungr

CLI cmd refactor

parent 984b9839
......@@ -80,7 +80,7 @@ static std::optional<opt::OptionsResult> ParseCliCommandCommon(OrderedMap<std::s
if (tokens.empty())
{
error = "Empty command";
return {};
return std::nullopt;
}
subCmd = tokens[0];
......@@ -88,13 +88,13 @@ static std::optional<opt::OptionsResult> ParseCliCommandCommon(OrderedMap<std::s
if (subCmd == "commands")
{
output = DumpCommands(cmdEntries);
return {};
return std::nullopt;
}
if (cmdEntries.count(subCmd) == 0)
{
error = "Command not recognized: " + subCmd;
return {};
return std::nullopt;
}
opt::OptionsDescription desc = cmdEntries[subCmd].descriptionFunc(subCmd, cmdEntries[subCmd]);
......
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