Skip to content

Commit 3049bb6

Browse files
Added some comments
1 parent 7693bce commit 3049bb6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

OptionParser.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,16 @@ Option::parse(vector<string> &command_line) {
237237
format_option(command_line[i + 1]);
238238
}
239239
else {
240+
// this will only work if it's a bool, because the
241+
// format_option function will ignore the argument
240242
format_option(dummy);
241243
}
242244

243245
specified = true;
246+
// remove this option from the set of options
244247
command_line.erase(command_line.begin() + i);
248+
// if there was an argument (i.e. non bool) then remove that
249+
// argument also
245250
if (arg_type != SMITHLAB_ARG_BOOL) {
246251
command_line.erase(command_line.begin() + i);
247252
}

0 commit comments

Comments
 (0)