Minor cleanup
diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
index b83a2e3..ea1d371 100644
--- a/src/hb-open-type-private.hh
+++ b/src/hb-open-type-private.hh
@@ -718,13 +718,9 @@
template <typename SearchType>
inline int search (const SearchType &x) const {
class Cmp {
- public: static int cmp (const void *p1, const void *p2) {
- const SearchType *a = reinterpret_cast<const SearchType *>(p1);
- const Type *b = reinterpret_cast<const Type *>(p2);
- return b->cmp (*a);
- }
+ public: static int cmp (const SearchType *a, const Type *b) { return b->cmp (*a); }
};
- const Type *p = (const Type *) bsearch (&x, this->array, this->len, sizeof (this->array[0]), Cmp::cmp);
+ const Type *p = (const Type *) bsearch (&x, this->array, this->len, sizeof (this->array[0]), (hb_compare_func_t) Cmp::cmp);
return p ? p - this->array : -1;
}
};