summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-09-29 12:34:39 (GMT)
committerBrad King <brad.king@kitware.com>2009-09-29 12:34:39 (GMT)
commitaa8c003609dd57d47d7a45624185bc71134fe294 (patch)
treeae6a9857179ea530d8b3746125a4237032b9cc2a
parentb0744ad969e19b86aa82ee01f69a203f725d436d (diff)
downloadCMake-aa8c003609dd57d47d7a45624185bc71134fe294.zip
CMake-aa8c003609dd57d47d7a45624185bc71134fe294.tar.gz
CMake-aa8c003609dd57d47d7a45624185bc71134fe294.tar.bz2
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.
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx2
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 9b3c5d5..b687fe1 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 54363e4..401888f 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -180,7 +180,7 @@ protected:
std::vector<int> 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<cmTarget*, TargetProgress,
ProgressMapCompare> ProgressMapType;
ProgressMapType ProgressMap;