From 75643755a1492f3d07e811541207769341eb2b9e Mon Sep 17 00:00:00 2001 From: Leonid Pospelov Date: Wed, 24 Apr 2019 17:18:11 +0300 Subject: cmGlobalVisualStudioGenerator: remove redundant variables --- Source/cmGlobalVisualStudioGenerator.cxx | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index d457cc3..cd0355f 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -203,9 +203,7 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets() // Now make all targets depend on the ALL_BUILD target for (cmLocalGenerator const* i : gen) { - std::vector const& targets = - i->GetGeneratorTargets(); - for (cmGeneratorTarget* tgt : targets) { + for (cmGeneratorTarget* tgt : i->GetGeneratorTargets()) { if (tgt->GetType() == cmStateEnums::GLOBAL_TARGET || tgt->IsImported()) { continue; @@ -392,11 +390,8 @@ bool cmGlobalVisualStudioGenerator::ComputeTargetDepends() return false; } for (auto const& it : this->ProjectMap) { - std::vector const& gen = it.second; - for (const cmLocalGenerator* i : gen) { - std::vector const& targets = - i->GetGeneratorTargets(); - for (cmGeneratorTarget* ti : targets) { + for (const cmLocalGenerator* i : it.second) { + for (cmGeneratorTarget* ti : i->GetGeneratorTargets()) { this->ComputeVSTargetDepends(ti); } } @@ -448,8 +443,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends( std::set linkDepends; if (target->GetType() != cmStateEnums::STATIC_LIBRARY) { for (cmTargetDepend const& di : depends) { - cmTargetDepend dep = di; - if (dep.IsLink()) { + if (di.IsLink()) { this->FollowLinkDepends(di, linkDepends); } } @@ -458,8 +452,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends( // Collect explicit util dependencies (add_dependencies). std::set utilDepends; for (cmTargetDepend const& di : depends) { - cmTargetDepend dep = di; - if (dep.IsUtil()) { + if (di.IsUtil()) { this->FollowLinkDepends(di, utilDepends); } } -- cgit v0.12