[bit-set-invertible] Write a subset branch as dagger
This commit is contained in:
parent
c39d2f7a76
commit
c66894d7c9
|
@ -103,13 +103,7 @@ struct hb_bit_set_invertible_t
|
||||||
{
|
{
|
||||||
if (inverted && !larger_set.inverted) return false; /*XXX*/
|
if (inverted && !larger_set.inverted) return false; /*XXX*/
|
||||||
if (!inverted && larger_set.inverted)
|
if (!inverted && larger_set.inverted)
|
||||||
{
|
return hb_all (hb_iter (s) | hb_map (larger_set.s));
|
||||||
/* TODO(iter) Write as hb_all dagger. */
|
|
||||||
for (auto c: s)
|
|
||||||
if (larger_set.s.has (c))
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
/* inverted == larger_set.inverted */
|
/* inverted == larger_set.inverted */
|
||||||
return inverted ? larger_set.s.is_subset (s) : s.is_subset (larger_set.s);
|
return inverted ? larger_set.s.is_subset (s) : s.is_subset (larger_set.s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue