1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--- "a/simple tree.hpp"
+++ "b/simple tree.hpp"
@@ -323,7 +323,7 @@
public:
compare_nodes(StrictWeakOrdering comp) : comp_(comp) {};
- bool operator()(const tree_node *a, const tree_node *b)
+ bool operator()(const tree_node *a, const tree_node *b) const
{
return comp_(a->data, b->data);
}
--- a/tree.hh
+++ b/tree.hh
@@ -422,7 +422,7 @@
public:
compare_nodes(StrictWeakOrdering comp) : comp_(comp) {};
- bool operator()(const tree_node *a, const tree_node *b)
+ bool operator()(const tree_node *a, const tree_node *b) const
{
return comp_(a->data, b->data);
}
--- a/xinlin.hh
+++ b/xinlin.hh
@@ -332,7 +332,7 @@
public:
compare_nodes(StrictWeakOrdering comp) : comp_(comp) {};
- bool operator()(const tree_node *a, const tree_node *b)
+ bool operator()(const tree_node *a, const tree_node *b) const
{
return comp_(a->data, b->data);
}
|