[arrays] Improve bfind() interface
Much more useful now. :)
diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh
index c7154c4..1c810e7 100644
--- a/src/hb-open-type.hh
+++ b/src/hb-open-type.hh
@@ -475,8 +475,10 @@
inline const Type &bsearch (unsigned int len, const T &x) const
{ return *as_array (len).bsearch (x, &Null (Type)); }
template <typename T>
- inline bool bfind (unsigned int len, const T &x, unsigned int *i = nullptr) const
- { return as_array (len).bfind (x, i); }
+ inline bool bfind (unsigned int len, const T &x, unsigned int *i = nullptr,
+ hb_bfind_not_found_t not_found = HB_BFIND_NOT_FOUND_DONT_STORE,
+ unsigned int to_store = (unsigned int) -1) const
+ { return as_array (len).bfind (x, i, not_found, to_store); }
};
@@ -782,8 +784,10 @@
inline const Type &bsearch (const T &x) const
{ return *as_array ().bsearch (x, &Null (Type)); }
template <typename T>
- inline bool bfind (const T &x, unsigned int *i = nullptr) const
- { return as_array ().bfind (x, i); }
+ inline bool bfind (const T &x, unsigned int *i = nullptr,
+ hb_bfind_not_found_t not_found = HB_BFIND_NOT_FOUND_DONT_STORE,
+ unsigned int to_store = (unsigned int) -1) const
+ { return as_array ().bfind (x, i, not_found, to_store); }
};
/*