diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-11-25 15:33:00 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-11 16:00:55 (GMT) |
commit | 6162c9194bfb416ac43f52f281db442a4d484aff (patch) | |
tree | 09a0aed1555a18c1c44af2c8e81a725dca8f051f /Source/cmTarget.cxx | |
parent | 238dd2fbab1bd4fb53a25dcd07c1ee41da46d451 (diff) | |
download | CMake-6162c9194bfb416ac43f52f281db442a4d484aff.zip CMake-6162c9194bfb416ac43f52f281db442a4d484aff.tar.gz CMake-6162c9194bfb416ac43f52f281db442a4d484aff.tar.bz2 |
Use two-iterator std::set::insert where appropriate.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 1b39804..c8fbf61 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -424,12 +424,8 @@ void cmTarget::SetMakefile(cmMakefile* mf) const std::set<std::string> parentSystemIncludes = this->Makefile->GetSystemIncludeDirectories(); - for (std::set<std::string>::const_iterator it - = parentSystemIncludes.begin(); - it != parentSystemIncludes.end(); ++it) - { - this->SystemIncludeDirectories.insert(*it); - } + this->SystemIncludeDirectories.insert(parentSystemIncludes.begin(), + parentSystemIncludes.end()); const std::vector<cmValueWithOrigin> parentOptions = this->Makefile->GetCompileOptionsEntries(); @@ -1397,22 +1393,14 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, void cmTarget::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()); } //---------------------------------------------------------------------------- void cmTarget::AddSystemIncludeDirectories(const std::vector<std::string> &incs) { - for(std::vector<std::string>::const_iterator li = incs.begin(); - li != incs.end(); ++li) - { - this->SystemIncludeDirectories.insert(*li); - } + this->SystemIncludeDirectories.insert(incs.begin(), incs.end()); } #if defined(_WIN32) && !defined(__CYGWIN__) |