From 34f5cc2cc80cf1fd45bc9697d828d3536e3ac74f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 6 Dec 2019 04:09:33 +0000 Subject: [PATCH] Second try at fixing build --- src/hb-algs.hh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/hb-algs.hh b/src/hb-algs.hh index 0ccf9c80c..b00015e08 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -680,11 +680,20 @@ _cmp_method (const void *pkey, const void *pval, Ts... ds) return val.cmp (key, ds...); } -template +template static inline V* hb_bsearch (const K& key, V* base, size_t nmemb, size_t stride = sizeof (V), - int (*compar)(const void *_key, const void *_item, Ts... _ds) = _cmp_method, + int (*compar)(const void *_key, const void *_item) = _cmp_method) +{ + V* p; + return hb_bsearch_impl (&p, key, base, nmemb, stride, compar) ? p : nullptr; +} +template +static inline V* +hb_bsearch (const K& key, V* base, + size_t nmemb, size_t stride, + int (*compar)(const void *_key, const void *_item, Ts... _ds), Ts... ds) { V* p;