Skip to content

Commit

Permalink
Simplify CMD line syntax (idaholab#17989)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed Jun 7, 2021
1 parent 82ae2bc commit 473f0c7
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions framework/include/parser/CommandLine.h
Expand Up @@ -214,15 +214,17 @@ CommandLine::search(const std::string & option_name, std::vector<T> & argument)
// we append a true value to the vector.
if (pos->second.argument_type == NONE)
argument.push_back(T());
else if (j + 1 < _args.size())
{
std::stringstream ss;
ss << _args[j + 1];

T item;
setArgument(ss, item);
argument.push_back(item);
}
else
while (j + 1 < _args.size() && _args[j + 1][0] != '-')
{
std::stringstream ss;
ss << _args[j + 1];

T item;
setArgument(ss, item);
argument.push_back(item);
++j;
}
}
}
}
Expand Down

0 comments on commit 473f0c7

Please sign in to comment.