Speed up Speed up hb_set_digest_common_bits_t calcs
Correctly this time.
This commit is contained in:
parent
893991fc9d
commit
02e5e58368
|
@ -54,9 +54,11 @@ struct hb_set_digest_common_bits_t
|
|||
}
|
||||
|
||||
inline void add_range (hb_codepoint_t a, hb_codepoint_t b) {
|
||||
/* TODO Speedup. */
|
||||
for (unsigned int i = a; i < b + 1; i++)
|
||||
add (i);
|
||||
add (a);
|
||||
/* The negation here stands for ~(x-1). */
|
||||
mask_t upper_bits = -(1 << _hb_bit_storage (a ^ b));
|
||||
mask &= upper_bits;
|
||||
value &= upper_bits;
|
||||
}
|
||||
|
||||
inline bool may_have (hb_codepoint_t g) const {
|
||||
|
|
Loading…
Reference in New Issue