Explorar o código

Refactor: Initialize args vector from iterators instead of copy

Signed-off-by: Alex Turbov <[email protected]>
Alex Turbov %!s(int64=4) %!d(string=hai) anos
pai
achega
9946ff6848
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      Source/cmConditionEvaluator.cxx

+ 2 - 4
Source/cmConditionEvaluator.cxx

@@ -374,12 +374,10 @@ bool cmConditionEvaluator::HandleLevel0(cmArgumentList& newArgs,
           return false;
           return false;
         }
         }
         // store the reduced args in this vector
         // store the reduced args in this vector
-        std::vector<cmExpandedCommandArgument> newArgs2;
-
-        // copy to the list structure
         auto argP1 = std::next(arg);
         auto argP1 = std::next(arg);
-        cm::append(newArgs2, argP1, argClose);
+        std::vector<cmExpandedCommandArgument> newArgs2{ argP1, argClose };
         newArgs2.pop_back();
         newArgs2.pop_back();
+
         // now recursively invoke IsTrue to handle the values inside the
         // now recursively invoke IsTrue to handle the values inside the
         // parenthetical expression
         // parenthetical expression
         const auto value = this->IsTrue(newArgs2, errorString, status);
         const auto value = this->IsTrue(newArgs2, errorString, status);