Commit c692be41cf7ea9c11e23d23515c8c082227d234d
Committed by
GitHub
1 parent
de215ef9
fix: rename variable to avoid clash with optarg (#734)
https://linux.die.net/man/3/optarg
Showing
1 changed file
with
3 additions
and
3 deletions
include/CLI/App.hpp
| ... | ... | @@ -2844,9 +2844,9 @@ class App { |
| 2844 | 2844 | break; |
| 2845 | 2845 | } |
| 2846 | 2846 | if(validate_optional_arguments_) { |
| 2847 | - std::string optarg = args.back(); | |
| 2848 | - optarg = op->_validate(optarg, 0); | |
| 2849 | - if(!optarg.empty()) { | |
| 2847 | + std::string arg = args.back(); | |
| 2848 | + arg = op->_validate(arg, 0); | |
| 2849 | + if(!arg.empty()) { | |
| 2850 | 2850 | break; |
| 2851 | 2851 | } |
| 2852 | 2852 | } | ... | ... |