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:29:14 +0200
commitc806a7ef14ae14df01fb869b247a6fff8ac3c27c (patch)
tree89d94d82712fb810fc12b59e888e3365cc751ba7
parent7f8e26359d6cfd1bc04e2c7a2eb0ac46a8f8ef40 (diff)
downloadqalculate-tde-c806a7ef.tar.gz
qalculate-tde-c806a7ef.zip
The operator< should be const, so it can be applied to const tree_struct.r14.0.11
This resolves FTBFS on FreeBSD. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 2e4f150a4712cf531f4dcb9c5c045833b8c7049f)
-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;