Skip to content

Commit

Permalink
Added some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdavidsmith committed Jul 27, 2019
1 parent 7693bce commit 3049bb6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OptionParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,16 @@ Option::parse(vector<string> &command_line) {
format_option(command_line[i + 1]);
}
else {
// this will only work if it's a bool, because the
// format_option function will ignore the argument
format_option(dummy);
}

specified = true;
// remove this option from the set of options
command_line.erase(command_line.begin() + i);
// if there was an argument (i.e. non bool) then remove that
// argument also
if (arg_type != SMITHLAB_ARG_BOOL) {
command_line.erase(command_line.begin() + i);
}
Expand Down

0 comments on commit 3049bb6

Please sign in to comment.