Allow implicit usage of arg only once
This commit is contained in:
parent
980794066b
commit
783121ed5e
|
@ -521,7 +521,7 @@ void ArgumentParser::readSpecifiedArgs(ArgumentVector &args, std::size_t &index,
|
||||||
if(!matchingArg) {
|
if(!matchingArg) {
|
||||||
// use the first default argument
|
// use the first default argument
|
||||||
for(Argument *arg : args) {
|
for(Argument *arg : args) {
|
||||||
if(arg->isImplicit()) {
|
if(arg->isImplicit() && !arg->isPresent()) {
|
||||||
(matchingArg = arg)->m_indices.push_back(index);
|
(matchingArg = arg)->m_indices.push_back(index);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue