diff --git a/src/runtime/c/pgf/parser.cxx b/src/runtime/c/pgf/parser.cxx index 603642add..5b9ba56e3 100644 --- a/src/runtime/c/pgf/parser.cxx +++ b/src/runtime/c/pgf/parser.cxx @@ -514,7 +514,7 @@ void PgfAbstractParser::combine(State *state, Item *item, CCat *ccat) state->push_item(item); } -bool PgfAbstractParser::ItemComparator::operator()(Item *item1, Item *item2) +bool PgfAbstractParser::ItemComparator::operator()(Item *item1, Item *item2) const { if (item1->rule.as_object() < item2->rule.as_object()) return true; diff --git a/src/runtime/c/pgf/parser.h b/src/runtime/c/pgf/parser.h index ed7b3baa4..38c5cac10 100644 --- a/src/runtime/c/pgf/parser.h +++ b/src/runtime/c/pgf/parser.h @@ -132,7 +132,7 @@ protected: } item_prob_comp; struct ItemComparator : std::less { - bool operator()(Item *item1, Item *item2); + bool operator()(Item *item1, Item *item2) const; }; struct Cont {