From 00e0c416ffccf6edb63fe7f4b01422915ff12f86 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 11 Dec 2017 12:05:14 -0600 Subject: [PATCH] Mark comparison call operator as const --- src/libstore/build.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 866964a4c..d4bd650ba 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -79,7 +79,7 @@ typedef std::shared_ptr GoalPtr; typedef std::weak_ptr WeakGoalPtr; struct CompareGoalPtrs { - bool operator() (const GoalPtr & a, const GoalPtr & b); + bool operator() (const GoalPtr & a, const GoalPtr & b) const; }; /* 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 s2 = b->key(); return s1 < s2;