The operator< should be const, so it can be applied to const tree_struct.

This resolves FTBFS on FreeBSD.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 2e4f150a47)
r14.0.x r14.0.11
Slávek Banko 3 years ago
parent 7f8e26359d
commit c806a7ef14
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -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;

Loading…
Cancel
Save