Skip to content

Commit

Permalink
Update/fix tinyopt README.md (arbor-sim#1747)
Browse files Browse the repository at this point in the history
tinyopt README.md had an example which was not updated to the 1.0 API. Fixed upstream, and this is a copy.
  • Loading branch information
halfflat authored and bcumming committed Dec 3, 2021
1 parent b5e44ff commit 5adf977
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/tinyopt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ int main(int argc, char** argv) {
for (auto arg = argv+1; *arg; ) {
bool ok =
help << to::parse(arg, 'h', "help") ||
n << to::parse<int>(arg, 'n', "number") ||
fn << to::parse<int>(arg, to::keywords(functions), 'f', "function");
help << to::parse(arg, "-h", "--help") ||
n << to::parse<int>(arg, "-n", "--number") ||
fn << to::parse<int>(arg, to::keywords(functions), "-f", "--function");
if (!ok) throw to::option_error("unrecognized argument", *arg);
}
Expand Down

0 comments on commit 5adf977

Please sign in to comment.