about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2017-12-11T18·05-0600
committerWill Dietz <w@wdtz.org>2017-12-11T18·08-0600
commit00e0c416ffccf6edb63fe7f4b01422915ff12f86 (patch)
tree5a7373139f9827c8d4b960fd2083cfc8d752ef78
parente4d43f1f94f7488ae8dc1139c8485446c4209836 (diff)
Mark comparison call operator as const
-rw-r--r--src/libstore/build.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 866964a4c465..d4bd650baf22 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -79,7 +79,7 @@ typedef std::shared_ptr<Goal> GoalPtr;
 typedef std::weak_ptr<Goal> 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;