summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-10-11 02:26:07 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-10-11 02:28:17 +0200
commit2e4f150a4712cf531f4dcb9c5c045833b8c7049f (patch)
tree74cd42182d8882dd36030792b30d8ad73009bac5
parente926ed5b1bcf7dbe2ffd684e50635785b8a02002 (diff)
downloadqalculate-tde-2e4f150a.tar.gz
qalculate-tde-2e4f150a.zip
The operator< should be const, so it can be applied to const tree_struct.HEADmaster
This resolves FTBFS on FreeBSD. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--src/qalculate_tde_utils.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qalculate_tde_utils.h b/src/qalculate_tde_utils.h
index e51d0c1..e0c9238 100644
--- a/src/qalculate_tde_utils.h
+++ b/src/qalculate_tde_utils.h
@@ -41,7 +41,7 @@ struct tree_struct {
std::list<tree_struct> items;
std::list<tree_struct>::iterator it;
std::list<tree_struct>::reverse_iterator rit;
- std::vector<void*> objects;
+ std::vector<void*> objects;
tree_struct *parent;
void sort() {
items.sort();
@@ -49,9 +49,10 @@ struct tree_struct {
it->sort();
}
}
- bool operator < (tree_struct &s1) const {
- return item < s1.item;
- }
+ bool operator < (const tree_struct &s1) const
+ {
+ return item < s1.item;
+ }
};
struct mode_struct {
PrintOptions po;