diff --git a/src/hb-array.hh b/src/hb-array.hh index fc6e52b1d..417ffd5be 100644 --- a/src/hb-array.hh +++ b/src/hb-array.hh @@ -346,21 +346,20 @@ struct hb_sorted_array_t : unsigned int i; return bfind (x, &i) ? &this->arrayZ[i] : not_found; } - template + template const Type *bsearch (const T &x, const Type *not_found = nullptr) const { unsigned int i; return bfind (x, &i) ? &this->arrayZ[i] : not_found; } - template + template bool bfind (const T &x, unsigned int *i = nullptr, hb_not_found_t not_found = HB_NOT_FOUND_DONT_STORE, - unsigned int to_store = (unsigned int) -1, - Ts... ds) const + unsigned int to_store = (unsigned int) -1) const { unsigned pos; - if (bsearch_impl (x, &pos, ds...)) + if (bsearch_impl (x, &pos)) { if (i) *i = pos; diff --git a/src/hb-ot-tag.cc b/src/hb-ot-tag.cc index 31dd7c544..980a88583 100644 --- a/src/hb-ot-tag.cc +++ b/src/hb-ot-tag.cc @@ -289,9 +289,7 @@ hb_ot_tags_from_language (const char *lang_str, ot_languages = ot_languages3; ot_languages_len = ARRAY_LENGTH (ot_languages3); } - if (hb_sorted_array (ot_languages, ot_languages_len).bfind (lang_str, &tag_idx, - HB_NOT_FOUND_DONT_STORE, (unsigned) -1, - first_len)) + if (hb_sorted_array (ot_languages, ot_languages_len).bsearch_impl (lang_str, &tag_idx, first_len)) { unsigned int i; while (tag_idx != 0 &&