[bit-page] Short-circuit is_subset()

pull/4317/head
Behdad Esfahbod 2 years ago
parent 347c1f7013
commit 2f4ed5e939
  1. 4
      src/hb-bit-page.hh

@ -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;

Loading…
Cancel
Save