diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-11-25 16:33:00 +0100 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-11 17:00:55 +0100 |
commit | 6162c9194bfb416ac43f52f281db442a4d484aff (patch) | |
tree | 09a0aed1555a18c1c44af2c8e81a725dca8f051f /Source/cmExtraCodeBlocksGenerator.cxx | |
parent | 238dd2fbab1bd4fb53a25dcd07c1ee41da46d451 (diff) | |
download | cmake-6162c9194bfb416ac43f52f281db442a4d484aff.tar.gz |
Use two-iterator std::set::insert where appropriate.
Diffstat (limited to 'Source/cmExtraCodeBlocksGenerator.cxx')
-rw-r--r-- | Source/cmExtraCodeBlocksGenerator.cxx | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index 79d7bcaffb..69857ef3ef 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -615,12 +615,8 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout, std::vector<std::string> includes; target->GetMakefile()->GetLocalGenerator()-> GetIncludeDirectories(includes, gtgt, "C", buildType); - for(std::vector<std::string>::const_iterator dirIt=includes.begin(); - dirIt != includes.end(); - ++dirIt) - { - uniqIncludeDirs.insert(*dirIt); - } + + uniqIncludeDirs.insert(includes.begin(), includes.end()); std::string systemIncludeDirs = makefile->GetSafeDefinition( "CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS"); @@ -628,12 +624,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout, { std::vector<std::string> dirs; cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs); - for(std::vector<std::string>::const_iterator dirIt=dirs.begin(); - dirIt != dirs.end(); - ++dirIt) - { - uniqIncludeDirs.insert(*dirIt); - } + uniqIncludeDirs.insert(dirs.begin(), dirs.end()); } systemIncludeDirs = makefile->GetSafeDefinition( @@ -642,12 +633,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout, { std::vector<std::string> dirs; cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs); - for(std::vector<std::string>::const_iterator dirIt=dirs.begin(); - dirIt != dirs.end(); - ++dirIt) - { - uniqIncludeDirs.insert(*dirIt); - } + uniqIncludeDirs.insert(dirs.begin(), dirs.end()); } for(std::set<std::string>::const_iterator dirIt=uniqIncludeDirs.begin(); |