parent
d75a835ca1
commit
5eb63a32e5
|
@ -37,12 +37,8 @@ ParametersParser::ParametersParser(ParameterList params,
|
||||||
throw runtime_error{format("switch '-{}' specified more than once", it->key)};
|
throw runtime_error{format("switch '-{}' specified more than once", it->key)};
|
||||||
switch_seen[switch_index] = true;
|
switch_seen[switch_index] = true;
|
||||||
|
|
||||||
if (it->value.takes_arg)
|
if (it->value.takes_arg and ++i == params.size())
|
||||||
{
|
throw missing_option_value(it->key);
|
||||||
++i;
|
|
||||||
if (i == params.size() or params[i][0_byte] == '-')
|
|
||||||
throw missing_option_value(it->key);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else // positional
|
else // positional
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user