mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-29 17:44:06 +01:00
[bit-page] Short-circuit is_subset()
This commit is contained in:
1 parent
347c1f7013
commit
2f4ed5e939
1 file changed
+4
@@ -226,6 +226,10 @@ struct hb_bit_page_t
|
||||
}
|
||||
bool is_subset (const hb_bit_page_t &larger_page) const
|
||||
{
|
||||
if (has_population () && larger_page.has_population () &&
|
||||
population > larger_page.population)
|
||||
return false;
|
||||
|
||||
for (unsigned i = 0; i < len (); i++)
|
||||
if (~larger_page.v[i] & v[i])
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user