Skip to content

Commit

Permalink
Merge pull request #191 from jun-sheaf/patch-1
Browse files Browse the repository at this point in the history
Remove unnecessary back_inserter
  • Loading branch information
p-ranav authored Aug 31, 2022
2 parents c44dde5 + 876aa99 commit 68abf03
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/argparse/argparse.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1048,9 +1048,7 @@ class ArgumentParser {
*/
// NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays)
void parse_args(int argc, const char *const argv[]) {
std::vector<std::string> arguments;
std::copy(argv, argv + argc, std::back_inserter(arguments));
parse_args(arguments);
parse_args({argv, argv + argc});
}

/* Getter for options with default values.
Expand Down

0 comments on commit 68abf03

Please sign in to comment.