[bit-page] Write is_empty() as dagger
This commit is contained in:
parent
43a4028f0e
commit
744eb6baf9
|
@ -68,6 +68,9 @@ struct hb_vector_size_t
|
||||||
hb_vector_size_t operator ~ () const
|
hb_vector_size_t operator ~ () const
|
||||||
{ return process (hb_bitwise_neg); }
|
{ return process (hb_bitwise_neg); }
|
||||||
|
|
||||||
|
hb_array_t<const elt_t> iter () const
|
||||||
|
{ return hb_array (v); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static_assert (0 == byte_size % sizeof (elt_t), "");
|
static_assert (0 == byte_size % sizeof (elt_t), "");
|
||||||
elt_t v[byte_size / sizeof (elt_t)];
|
elt_t v[byte_size / sizeof (elt_t)];
|
||||||
|
@ -84,10 +87,10 @@ struct hb_bit_page_t
|
||||||
|
|
||||||
bool is_empty () const
|
bool is_empty () const
|
||||||
{
|
{
|
||||||
for (unsigned i = 0; i < len (); i++)
|
return
|
||||||
if (v[i])
|
+ hb_iter (v)
|
||||||
return false;
|
| hb_none
|
||||||
return true;
|
;
|
||||||
}
|
}
|
||||||
uint32_t hash () const
|
uint32_t hash () const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue