Revert "Speed up hb_set_digest_common_bits_t calcs"
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 17 Apr 2013 01:47:40 +0000 (21:47 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 17 Apr 2013 01:47:40 +0000 (21:47 -0400)
This reverts commit 3d1b66a35e1ab3be19335705f310b278d76d66d2.

The calculations were buggy.  It's not worth optimizing right now.

src/hb-set-private.hh

index 5e30a7e..1241e05 100644 (file)
@@ -54,9 +54,9 @@ struct hb_set_digest_common_bits_t
   }
 
   inline void add_range (hb_codepoint_t a, hb_codepoint_t b) {
-    /* The negation here stands for ~(x-1). */
-    mask &= -(1 << _hb_bit_storage (a ^ b));
-    value &= mask;
+    /* TODO Speedup. */
+    for (unsigned int i = a; i < b + 1; i++)
+      add (i);
   }
 
   inline bool may_have (hb_codepoint_t g) const {