Skip to content

Commit

Permalink
exit after help/version args
Browse files Browse the repository at this point in the history
  • Loading branch information
radj307 committed Feb 15, 2022
1 parent 018c196 commit c5a8987
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions conv2/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,14 @@ int main(const int argc, char** argv)
bool quiet{ checkarg('q',"quiet") };
bool numGrouping{ getarg_any('g', "group") };

if (args.empty() || checkarg('h', "help"))
if (args.empty() || checkarg('h', "help")) {
std::cout << print_help;
else if (checkarg('v', "version"))
return 0;
}
else if (checkarg('v', "version")) {
std::cout << (quiet ? "" : "conv2 ") << CONV2_VERSION << std::endl;
return 0;
}

const auto& parameters{ args.typegetv_all<opt::Parameter>() };

Expand Down

0 comments on commit c5a8987

Please sign in to comment.