diff options
author | Leonid Pospelov <pospelovlm@yandex.ru> | 2019-04-22 21:52:33 (GMT) |
---|---|---|
committer | Leonid Pospelov <pospelovlm@yandex.ru> | 2019-04-22 21:52:33 (GMT) |
commit | 30c98db61be3e0079305514b98b2d3d07b6877cc (patch) | |
tree | c51b29e95e0fb366ae3dc474920cbc610ec45e94 /Source/cmGlobalVisualStudioGenerator.cxx | |
parent | 955f7f41c08b90553fb4bcf364c12c072802d925 (diff) | |
download | CMake-30c98db61be3e0079305514b98b2d3d07b6877cc.zip CMake-30c98db61be3e0079305514b98b2d3d07b6877cc.tar.gz CMake-30c98db61be3e0079305514b98b2d3d07b6877cc.tar.bz2 |
cmGlobalVisualStudioGenerator: use auto instead of iterator types
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 39c325c..aa70522 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -368,7 +368,7 @@ void cmGlobalVisualStudioGenerator::FillLinkClosure( cmGlobalVisualStudioGenerator::TargetSet const& cmGlobalVisualStudioGenerator::GetTargetLinkClosure(cmGeneratorTarget* target) { - TargetSetMap::iterator i = this->TargetLinkClosure.find(target); + auto i = this->TargetLinkClosure.find(target); if (i == this->TargetLinkClosure.end()) { TargetSetMap::value_type entry(target, TargetSet()); i = this->TargetLinkClosure.insert(entry).first; @@ -513,7 +513,7 @@ bool cmGlobalVisualStudioGenerator::FindMakeProgram(cmMakefile* mf) std::string cmGlobalVisualStudioGenerator::GetUtilityDepend( cmGeneratorTarget const* target) { - UtilityDependsMap::iterator i = this->UtilityDepends.find(target); + auto i = this->UtilityDepends.find(target); if (i == this->UtilityDepends.end()) { std::string name = this->WriteUtilityDepend(target); UtilityDependsMap::value_type entry(target, name); @@ -939,11 +939,10 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand( std::vector<std::string> objs; for (cmSourceFile const* it : objectSources) { // Find the object file name corresponding to this source file. - std::map<cmSourceFile const*, std::string>::const_iterator map_it = - mapping.find(it); // It must exist because we populated the mapping just above. - assert(!map_it->second.empty()); - std::string objFile = obj_dir + map_it->second; + const auto& v = mapping[it]; + assert(!v.empty()); + std::string objFile = obj_dir + v; objs.push_back(objFile); } std::vector<cmSourceFile const*> externalObjectSources; |