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>
pull/4/head
Slávek Banko 3 years ago
parent e926ed5b1b
commit 2e4f150a47
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