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