options: accept compacted option arguments
ex: -n1
This commit is contained in:
parent
829e95ad8d
commit
60cc951679
1 changed files with 2 additions and 5 deletions
|
|
@ -229,10 +229,7 @@ std::vector<std::string> ztd::option_set::process(std::vector<std::string> argum
|
|||
}
|
||||
else //continue
|
||||
{
|
||||
if( (*it)[i] != '=') //incorrect
|
||||
{
|
||||
throw ztd::option_error(ztd::option_error::missing_arg, std::string("-") + popt->charName );
|
||||
}
|
||||
if( (*it)[i] == '=')
|
||||
i++;
|
||||
popt->argument = (*it).substr(i , (*it).size()-i );
|
||||
popt->activated = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue