From ee5bc006ebee898729b81237719106704a2bb38a Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 18 Feb 2015 21:58:07 +0100 Subject: [PATCH] cmGeneratorTarget: Replace set insert algorithm with cmRemoveDuplicates. --- Source/cmGeneratorTarget.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index a4f099bb33..44c9e9a59d 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -528,23 +528,22 @@ cmGeneratorTarget::UseObjectLibraries(std::vector& objs, std::vector objectFiles; this->GetExternalObjects(objectFiles, config); std::vector objectLibraries; - std::set emitted; for(std::vector::const_iterator it = objectFiles.begin(); it != objectFiles.end(); ++it) { std::string objLib = (*it)->GetObjectLibrary(); if (cmTarget* tgt = this->Makefile->FindTargetToUse(objLib)) { - if (emitted.insert(tgt).second) - { - objectLibraries.push_back(tgt); - } + objectLibraries.push_back(tgt); } } + std::vector::const_iterator end + = cmRemoveDuplicates(objectLibraries); + for(std::vector::const_iterator ti = objectLibraries.begin(); - ti != objectLibraries.end(); ++ti) + ti != end; ++ti) { cmTarget* objLib = *ti; cmGeneratorTarget* ogt =