From 9946ff68481a1d02a75b646f3b275f98ca616d64 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Sun, 25 Jul 2021 19:07:36 +0300 Subject: Refactor: Initialize args vector from iterators instead of copy Signed-off-by: Alex Turbov --- Source/cmConditionEvaluator.cxx | 6 ++---- 1 file 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 newArgs2; - - // copy to the list structure auto argP1 = std::next(arg); - cm::append(newArgs2, argP1, argClose); + std::vector 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); -- cgit v0.12