From 748bc95cf5881394680cdc91c8027984427a5e6f Mon Sep 17 00:00:00 2001 From: Sean Robinson Date: Tue, 26 Oct 2021 12:58:24 -0700 Subject: [PATCH] Rename inner scope variables to differ from outer scope These variables with the same name are not the same variables because of scope rules. While the compiler is not confused by this naming, it may be less readable by someone attempting to edit this code. Signed-off-by: Sean Robinson --- include/argparse/argparse.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/argparse/argparse.hpp b/include/argparse/argparse.hpp index 75437f8..8a6dff8 100644 --- a/include/argparse/argparse.hpp +++ b/include/argparse/argparse.hpp @@ -453,18 +453,18 @@ public: struct action_apply { void operator()(valued_action &f) { - std::transform(start, end, std::back_inserter(self.mValues), f); + std::transform(first, last, std::back_inserter(self.mValues), f); } void operator()(void_action &f) { - std::for_each(start, end, f); + std::for_each(first, last, f); if (!self.mDefaultValue.has_value()) { if (auto expected = self.maybe_nargs()) self.mValues.resize(*expected); } } - Iterator start, end; + Iterator first, last; Argument &self; }; std::visit(action_apply{start, end, *this}, mAction);