From c3a2f78b5a322bd14123cb301dc62dc3b58073b5 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 17 Mar 2014 15:32:19 +0100 Subject: Makefiles: Remove duplicate code. The cmGlobalUnixMakefileGenerator3::ProgressMapCompare struct is logically equivalent to cmStrictTargetComparison. --- Source/cmGlobalUnixMakefileGenerator3.cxx | 15 --------------- Source/cmGlobalUnixMakefileGenerator3.h | 4 +--- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index e37ee10..3aa293e 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -958,21 +958,6 @@ cmGlobalUnixMakefileGenerator3::RecordTargetProgress( } //---------------------------------------------------------------------------- -bool -cmGlobalUnixMakefileGenerator3::ProgressMapCompare -::operator()(cmTarget const* l, cmTarget const* r) const -{ - // Order by target name. - if(int c = strcmp(l->GetName().c_str(), r->GetName().c_str())) - { - return c < 0; - } - // Order duplicate targets by binary directory. - return strcmp(l->GetMakefile()->GetCurrentOutputDirectory(), - r->GetMakefile()->GetCurrentOutputDirectory()) < 0; -} - -//---------------------------------------------------------------------------- void cmGlobalUnixMakefileGenerator3::TargetProgress ::WriteProgressVariables(unsigned long total, unsigned long ¤t) diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index d003789..f44dd12 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -185,10 +185,8 @@ protected: std::vector Marks; void WriteProgressVariables(unsigned long total, unsigned long& current); }; - struct ProgressMapCompare { bool operator()(cmTarget const*, - cmTarget const*) const; }; typedef std::map ProgressMapType; + cmStrictTargetComparison> ProgressMapType; ProgressMapType ProgressMap; size_t CountProgressMarksInTarget(cmTarget const* target, -- cgit v0.12