Mark comparison call operator as const
This commit is contained in:
parent
e4d43f1f94
commit
00e0c416ff
1 changed files with 2 additions and 2 deletions
|
@ -79,7 +79,7 @@ typedef std::shared_ptr<Goal> GoalPtr;
|
||||||
typedef std::weak_ptr<Goal> WeakGoalPtr;
|
typedef std::weak_ptr<Goal> WeakGoalPtr;
|
||||||
|
|
||||||
struct CompareGoalPtrs {
|
struct CompareGoalPtrs {
|
||||||
bool operator() (const GoalPtr & a, const GoalPtr & b);
|
bool operator() (const GoalPtr & a, const GoalPtr & b) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Set of goals. */
|
/* Set of goals. */
|
||||||
|
@ -178,7 +178,7 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
bool CompareGoalPtrs::operator() (const GoalPtr & a, const GoalPtr & b) {
|
bool CompareGoalPtrs::operator() (const GoalPtr & a, const GoalPtr & b) const {
|
||||||
string s1 = a->key();
|
string s1 = a->key();
|
||||||
string s2 = b->key();
|
string s2 = b->key();
|
||||||
return s1 < s2;
|
return s1 < s2;
|
||||||
|
|
Loading…
Reference in a new issue