diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2017-12-21 16:51:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-12-21 19:52:49 (GMT) |
commit | 92c7b5260795153f4152e8562a7abac3d6d77d8a (patch) | |
tree | 1b058a2162fd352df824a8c470f5c4b222531f71 /Source/cmLocalVisualStudio10Generator.cxx | |
parent | 258e6f1b1e1d20bc48a5892f5d9d339269fa2704 (diff) | |
download | CMake-92c7b5260795153f4152e8562a7abac3d6d77d8a.zip CMake-92c7b5260795153f4152e8562a7abac3d6d77d8a.tar.gz CMake-92c7b5260795153f4152e8562a7abac3d6d77d8a.tar.bz2 |
VS: Use range-based 'for' loops in generator code
Use `auto` for complex types.
Diffstat (limited to 'Source/cmLocalVisualStudio10Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio10Generator.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index 5e81514..2803d4a 100644 --- a/Source/cmLocalVisualStudio10Generator.cxx +++ b/Source/cmLocalVisualStudio10Generator.cxx @@ -64,20 +64,18 @@ cmLocalVisualStudio10Generator::~cmLocalVisualStudio10Generator() void cmLocalVisualStudio10Generator::Generate() { - const std::vector<cmGeneratorTarget*>& tgts = this->GetGeneratorTargets(); - for (std::vector<cmGeneratorTarget*>::const_iterator l = tgts.begin(); - l != tgts.end(); ++l) { - if ((*l)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { + for (cmGeneratorTarget* l : tgts) { + if (l->GetType() == cmStateEnums::INTERFACE_LIBRARY) { continue; } if (static_cast<cmGlobalVisualStudioGenerator*>(this->GlobalGenerator) - ->TargetIsFortranOnly(*l)) { - this->CreateSingleVCProj((*l)->GetName().c_str(), *l); + ->TargetIsFortranOnly(l)) { + this->CreateSingleVCProj(l->GetName(), l); } else { cmVisualStudio10TargetGenerator tg( - *l, static_cast<cmGlobalVisualStudio10Generator*>( - this->GetGlobalGenerator())); + l, static_cast<cmGlobalVisualStudio10Generator*>( + this->GetGlobalGenerator())); tg.Generate(); } } |