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.
This commit is contained in:
parent
b0744ad969
commit
aa8c003609
|
@ -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()))
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue