From 1e757c318b38566aea1c9312a6fb5a3accd3966b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 5 Oct 2015 19:21:56 +0200 Subject: [PATCH] QtAutogen: Use a target type between loops. --- Source/cmGlobalGenerator.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 4a48b5d0b..53c859da3 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1413,8 +1413,8 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() { cmTargets& targets = this->LocalGenerators[i]->GetMakefile()->GetTargets(); - std::vector targetNames; - targetNames.reserve(targets.size()); + std::vector filteredTargets; + filteredTargets.reserve(targets.size()); for(cmTargets::iterator ti = targets.begin(); ti != targets.end(); ++ti) { @@ -1450,13 +1450,12 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() } cmQtAutoGeneratorInitializer::InitializeAutogenSources(&ti->second); - targetNames.push_back(ti->second.GetName()); + filteredTargets.push_back(&ti->second); } - for(std::vector::iterator ti = targetNames.begin(); - ti != targetNames.end(); ++ti) + for(std::vector::iterator ti = filteredTargets.begin(); + ti != filteredTargets.end(); ++ti) { - cmTarget* target = this->LocalGenerators[i] - ->GetMakefile()->FindTarget(*ti, true); + cmTarget* target = *ti; cmQtAutoGeneratorInitializer::InitializeAutogenTarget( this->LocalGenerators[i], target); autogenTargets.push_back(target);