From c692be41cf7ea9c11e23d23515c8c082227d234d Mon Sep 17 00:00:00 2001 From: PeteAudinate <99274874+PeteAudinate@users.noreply.github.com> Date: Tue, 24 May 2022 20:23:09 +0100 Subject: [PATCH] fix: rename variable to avoid clash with optarg (#734) https://linux.die.net/man/3/optarg --- include/CLI/App.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/CLI/App.hpp b/include/CLI/App.hpp index 013d2db3..1ae20207 100644 --- a/include/CLI/App.hpp +++ b/include/CLI/App.hpp @@ -2844,9 +2844,9 @@ class App { break; } if(validate_optional_arguments_) { - std::string optarg = args.back(); - optarg = op->_validate(optarg, 0); - if(!optarg.empty()) { + std::string arg = args.back(); + arg = op->_validate(arg, 0); + if(!arg.empty()) { break; } }