From 63f584b618b3381ad93c901f691191acd48329a7 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 25 Jan 2015 15:36:59 +0100 Subject: [PATCH] Replace while loop with member insert. --- Source/cmSetTargetPropertiesCommand.cxx | 9 +-------- Source/cmSetTestsPropertiesCommand.cxx | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/Source/cmSetTargetPropertiesCommand.cxx b/Source/cmSetTargetPropertiesCommand.cxx index 9a7fab2b6d..e41a0ca358 100644 --- a/Source/cmSetTargetPropertiesCommand.cxx +++ b/Source/cmSetTargetPropertiesCommand.cxx @@ -40,14 +40,7 @@ bool cmSetTargetPropertiesCommand this->SetError("called with incorrect number of arguments."); return false; } - while (j != args.end()) - { - propertyPairs.push_back(*j); - ++j; - propertyPairs.push_back(*j); - ++j; - } - // break out of the loop because j is already == end + propertyPairs.insert(propertyPairs.end(), j, args.end()); break; } else if (doingFiles) diff --git a/Source/cmSetTestsPropertiesCommand.cxx b/Source/cmSetTestsPropertiesCommand.cxx index 032c78ea79..d079a19a41 100644 --- a/Source/cmSetTestsPropertiesCommand.cxx +++ b/Source/cmSetTestsPropertiesCommand.cxx @@ -41,14 +41,7 @@ bool cmSetTestsPropertiesCommand this->SetError("called with incorrect number of arguments."); return false; } - while (j != args.end()) - { - propertyPairs.push_back(*j); - ++j; - propertyPairs.push_back(*j); - ++j; - } - // break out of the loop because j is already == end + propertyPairs.insert(propertyPairs.end(), j, args.end()); break; } else if (doingFiles)