From 92a37f92791f801d378b49fd86f097391facd02e Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 15 Jan 2015 03:09:43 +0100 Subject: [PATCH] Convert raw loops to set member insert. --- Source/cmGeneratorExpression.cxx | 8 ++------ Source/cmLoadCacheCommand.cxx | 5 +---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index b2a238649..bf96951ee 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -98,12 +98,8 @@ const char *cmCompiledGeneratorExpression::Evaluate( { this->Output += (*it)->Evaluate(&context, dagChecker); - for(std::set::const_iterator - p = context.SeenTargetProperties.begin(); - p != context.SeenTargetProperties.end(); ++p) - { - this->SeenTargetProperties.insert(*p); - } + this->SeenTargetProperties.insert(context.SeenTargetProperties.begin(), + context.SeenTargetProperties.end()); if (context.HadError) { this->Output = ""; diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx index 427e29df6..4f6e0c3b0 100644 --- a/Source/cmLoadCacheCommand.cxx +++ b/Source/cmLoadCacheCommand.cxx @@ -110,10 +110,7 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector const& args) // Prepare the table of variables to read. this->Prefix = args[2]; - for(unsigned int i=3; i < args.size(); ++i) - { - this->VariablesToRead.insert(args[i]); - } + this->VariablesToRead.insert(args.begin() + 3, args.end()); // Read the cache file. cmsys::ifstream fin(cacheFile.c_str());