diff --git a/src/hb-set-digest.hh b/src/hb-set-digest.hh index b97526f77..1ef1ba5fb 100644 --- a/src/hb-set-digest.hh +++ b/src/hb-set-digest.hh @@ -87,6 +87,8 @@ struct hb_set_digest_lowest_bits_t } } template + void add_array (const hb_array_t& arr) { add_array (&arr, arr.len ()); } + template bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T)) { for (unsigned int i = 0; i < count; i++) @@ -96,6 +98,8 @@ struct hb_set_digest_lowest_bits_t } return true; } + template + bool add_sorted_array (const hb_sorted_array_t& arr) { return add_sorted_array (&arr, arr.len ()); } bool may_have (hb_codepoint_t g) const { return !!(mask & mask_for (g)); } @@ -135,12 +139,16 @@ struct hb_set_digest_combiner_t tail.add_array (array, count, stride); } template + void add_array (const hb_array_t& arr) { add_array (&arr, arr.len ()); } + template bool add_sorted_array (const T *array, unsigned int count, unsigned int stride=sizeof(T)) { head.add_sorted_array (array, count, stride); tail.add_sorted_array (array, count, stride); return true; } + template + bool add_sorted_array (const hb_sorted_array_t& arr) { return add_sorted_array (&arr, arr.len ()); } bool may_have (hb_codepoint_t g) const {