util/OptionParser: collect remaining arguments
Allow the caller to use a simple "for" loop without checking arguments.
This commit is contained in:
@@ -53,7 +53,9 @@ OptionParser::ParseNext() noexcept
|
||||
option_raw = arg;
|
||||
return true;
|
||||
}
|
||||
|
||||
option = nullptr;
|
||||
option_raw = nullptr;
|
||||
*remaining_tail++ = arg;
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user