Fix handling of -- in parameter parser

This commit is contained in:
Maxime Coste 2014-08-26 22:10:54 +01:00
parent 01828523e3
commit c90bdb9862

View File

@ -19,7 +19,7 @@ ParametersParser::ParametersParser(ParameterList params,
bool only_pos = desc.flags & ParameterDesc::Flags::SwitchesAsPositional; bool only_pos = desc.flags & ParameterDesc::Flags::SwitchesAsPositional;
for (size_t i = 0; i < params.size(); ++i) for (size_t i = 0; i < params.size(); ++i)
{ {
if (params[i] == "--") if (not only_pos and params[i] == "--")
only_pos = true; only_pos = true;
else if (not only_pos and params[i][0] == '-') else if (not only_pos and params[i][0] == '-')
{ {