From aa8c003609dd57d47d7a45624185bc71134fe294 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 29 Sep 2009 08:34:39 -0400 Subject: [PATCH] Qualify std::map compare functor as const Some older STL implementations invoke the comparison functor as a const object, so the function call operator must be 'const' qualified. This fixes the commit "Fix support for OLD behavior of policy CMP0002" to compile on older STLs. --- Source/cmGlobalUnixMakefileGenerator3.cxx | 2 +- Source/cmGlobalUnixMakefileGenerator3.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 9b3c5d546..b687fe199 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -913,7 +913,7 @@ cmGlobalUnixMakefileGenerator3::RecordTargetProgress( //---------------------------------------------------------------------------- bool cmGlobalUnixMakefileGenerator3::ProgressMapCompare -::operator()(cmTarget* l, cmTarget* r) +::operator()(cmTarget* l, cmTarget* r) const { // Order by target name. if(int c = strcmp(l->GetName(), r->GetName())) diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index 54363e418..401888fa6 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -180,7 +180,7 @@ protected: std::vector Marks; void WriteProgressVariables(unsigned long total, unsigned long& current); }; - struct ProgressMapCompare { bool operator()(cmTarget*,cmTarget*); }; + struct ProgressMapCompare { bool operator()(cmTarget*,cmTarget*) const; }; typedef std::map ProgressMapType; ProgressMapType ProgressMap;