summaryrefslogtreecommitdiff
path: root/thirdparty/harfbuzz/src/hb-bit-page.hh
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/harfbuzz/src/hb-bit-page.hh')
-rw-r--r--thirdparty/harfbuzz/src/hb-bit-page.hh9
1 files changed, 8 insertions, 1 deletions
diff --git a/thirdparty/harfbuzz/src/hb-bit-page.hh b/thirdparty/harfbuzz/src/hb-bit-page.hh
index 9759836654..cbe918ee40 100644
--- a/thirdparty/harfbuzz/src/hb-bit-page.hh
+++ b/thirdparty/harfbuzz/src/hb-bit-page.hh
@@ -40,11 +40,18 @@ struct hb_bit_page_t
bool is_empty () const
{
- for (unsigned int i = 0; i < len (); i++)
+ for (unsigned i = 0; i < len (); i++)
if (v[i])
return false;
return true;
}
+ uint32_t hash () const
+ {
+ uint32_t h = 0;
+ for (unsigned i = 0; i < len (); i++)
+ h = h * 31 + hb_hash (v[i]);
+ return h;
+ }
void add (hb_codepoint_t g) { elt (g) |= mask (g); }
void del (hb_codepoint_t g) { elt (g) &= ~mask (g); }