mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-17 10:45:43 +00:00
[bit-page] Hand-code equality
Faster than memcmp() because of alignment.
This commit is contained in:
parent
9df06a2695
commit
a331e913dc
1 changed files with 4 additions and 1 deletions
|
@ -208,7 +208,10 @@ struct hb_bit_page_t
|
|||
|
||||
bool is_equal (const hb_bit_page_t &other) const
|
||||
{
|
||||
return 0 == hb_memcmp (&v, &other.v, sizeof (v));
|
||||
for (unsigned i = 0; i < len (); i++)
|
||||
if (v[i] != other.v[i])
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
bool is_subset (const hb_bit_page_t &larger_page) const
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue