summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-11-25 15:33:00 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-01-11 16:00:55 (GMT)
commit6162c9194bfb416ac43f52f281db442a4d484aff (patch)
tree09a0aed1555a18c1c44af2c8e81a725dca8f051f /Source/cmMakefile.cxx
parent238dd2fbab1bd4fb53a25dcd07c1ee41da46d451 (diff)
downloadCMake-6162c9194bfb416ac43f52f281db442a4d484aff.zip
CMake-6162c9194bfb416ac43f52f281db442a4d484aff.tar.gz
CMake-6162c9194bfb416ac43f52f281db442a4d484aff.tar.bz2
Use two-iterator std::set::insert where appropriate.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx18
1 files changed, 3 insertions, 15 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 25d5881..25d23f7 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1822,11 +1822,7 @@ void cmMakefile::AddIncludeDirectories(const std::vector<std::string> &incs,
void
cmMakefile::AddSystemIncludeDirectories(const std::set<std::string> &incs)
{
- for(std::set<std::string>::const_iterator li = incs.begin();
- li != incs.end(); ++li)
- {
- this->SystemIncludeDirectories.insert(*li);
- }
+ this->SystemIncludeDirectories.insert(incs.begin(), incs.end());
for (cmTargets::iterator l = this->Targets.begin();
l != this->Targets.end(); ++l)
@@ -4556,16 +4552,8 @@ void cmMakefile::PopScope()
this->Internal->VarInitStack.pop();
this->Internal->VarUsageStack.pop();
// Push initialization and usage up to the parent scope.
- it = init.begin();
- for (; it != init.end(); ++it)
- {
- this->Internal->VarInitStack.top().insert(*it);
- }
- it = usage.begin();
- for (; it != usage.end(); ++it)
- {
- this->Internal->VarUsageStack.top().insert(*it);
- }
+ this->Internal->VarInitStack.top().insert(init.begin(), init.end());
+ this->Internal->VarUsageStack.top().insert(usage.begin(), usage.end());
}
void cmMakefile::RaiseScope(const std::string& var, const char *varDef)