diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-15 02:09:43 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-18 14:14:47 (GMT) |
commit | 92a37f92791f801d378b49fd86f097391facd02e (patch) | |
tree | d1fede7d6f9c614391be9f84db6a63d45233517c | |
parent | aac44e71e6a6c2630f1c1e61b34cf91aa775dc02 (diff) | |
download | CMake-92a37f92791f801d378b49fd86f097391facd02e.zip CMake-92a37f92791f801d378b49fd86f097391facd02e.tar.gz CMake-92a37f92791f801d378b49fd86f097391facd02e.tar.bz2 |
Convert raw loops to set member insert.
-rw-r--r-- | Source/cmGeneratorExpression.cxx | 8 | ||||
-rw-r--r-- | Source/cmLoadCacheCommand.cxx | 5 |
2 files changed, 3 insertions, 10 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index b2a2386..bf96951 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<std::string>::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 427e29d..4f6e0c3 100644 --- a/Source/cmLoadCacheCommand.cxx +++ b/Source/cmLoadCacheCommand.cxx @@ -110,10 +110,7 @@ bool cmLoadCacheCommand::ReadWithPrefix(std::vector<std::string> 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()); |