Apply const qualifier to call operator of comparator class.

This commit is contained in:
Zoltan Szabadka 2014-10-15 13:33:56 +02:00
parent fe6e9b0148
commit 12c6d1fbe4

View File

@ -42,7 +42,7 @@ struct HistogramPair {
}; };
struct HistogramPairComparator { struct HistogramPairComparator {
bool operator()(const HistogramPair& p1, const HistogramPair& p2) { bool operator()(const HistogramPair& p1, const HistogramPair& p2) const {
if (p1.cost_diff != p2.cost_diff) { if (p1.cost_diff != p2.cost_diff) {
return p1.cost_diff > p2.cost_diff; return p1.cost_diff > p2.cost_diff;
} }