summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2021-07-25 16:07:36 (GMT)
committerAlex Turbov <i.zaufi@gmail.com>2021-07-26 20:40:18 (GMT)
commit9946ff68481a1d02a75b646f3b275f98ca616d64 (patch)
treec34c97bc62a7bff0d0941b7c335065a87b6bc58e
parentbf2fe903728a56755d045c768fc6cc0d46845cc5 (diff)
downloadCMake-9946ff68481a1d02a75b646f3b275f98ca616d64.zip
CMake-9946ff68481a1d02a75b646f3b275f98ca616d64.tar.gz
CMake-9946ff68481a1d02a75b646f3b275f98ca616d64.tar.bz2
Refactor: Initialize args vector from iterators instead of copy
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
-rw-r--r--Source/cmConditionEvaluator.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index 0593786..871acd1 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -374,12 +374,10 @@ bool cmConditionEvaluator::HandleLevel0(cmArgumentList& newArgs,
return false;
}
// store the reduced args in this vector
- std::vector<cmExpandedCommandArgument> newArgs2;
-
- // copy to the list structure
auto argP1 = std::next(arg);
- cm::append(newArgs2, argP1, argClose);
+ std::vector<cmExpandedCommandArgument> newArgs2{ argP1, argClose };
newArgs2.pop_back();
+
// now recursively invoke IsTrue to handle the values inside the
// parenthetical expression
const auto value = this->IsTrue(newArgs2, errorString, status);