[bit-page] Write get_population as dagger
This commit is contained in:
parent
744eb6baf9
commit
87271e1b2e
|
@ -220,10 +220,10 @@ struct hb_bit_page_t
|
||||||
|
|
||||||
unsigned int get_population () const
|
unsigned int get_population () const
|
||||||
{
|
{
|
||||||
unsigned int pop = 0;
|
return
|
||||||
for (unsigned int i = 0; i < len (); i++)
|
+ hb_iter (v)
|
||||||
pop += hb_popcount (v[i]);
|
| hb_reduce ([] (unsigned pop, const elt_t &_) { return pop + hb_popcount (_); }, 0)
|
||||||
return pop;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool next (hb_codepoint_t *codepoint) const
|
bool next (hb_codepoint_t *codepoint) const
|
||||||
|
|
Loading…
Reference in New Issue