Remove HB_DEBUG_SET_DIGESTS
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 17 Apr 2013 23:01:49 +0000 (19:01 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 17 Apr 2013 23:01:49 +0000 (19:01 -0400)
Wasn't correct with the new combiner.  I should add it back somehow,
but for now the digests seem to be working very well...

src/hb-set-private.hh
src/hb-set.cc

index c6099cc..c2b3e46 100644 (file)
@@ -80,17 +80,12 @@ struct hb_set_digest_lowest_bits_t
 
   private:
 
-  static inline mask_t mask_for (hb_codepoint_t g)
-  {
+  static inline mask_t mask_for (hb_codepoint_t g) {
     return ((mask_t) 1) << ((g >> shift) & (sizeof (mask_t) * 8 - 1));
   }
   mask_t mask;
 };
 
-#ifdef HB_DEBUG_SET_DIGESTS
-extern unsigned long digest_total, digest_yes, digest_yes1, digest_yes2;
-#endif
-
 template <typename head_t, typename tail_t>
 struct hb_set_digest_combiner_t
 {
@@ -112,15 +107,6 @@ struct hb_set_digest_combiner_t
   }
 
   inline bool may_have (hb_codepoint_t g) const {
-#ifdef HB_DEBUG_SET_DIGESTS
-    digest_total++;
-    if (head.may_have (g) && tail.may_have (g))
-      digest_yes++;
-    if (head.may_have (g))
-      digest_yes1++;
-    if (tail.may_have (g))
-      digest_yes2++;
-#endif
     return head.may_have (g) && tail.may_have (g);
   }
 
index 050cc24..3c9573f 100644 (file)
 #include "hb-set-private.hh"
 
 
-#ifdef HB_DEBUG_SET_DIGESTS
-unsigned long digest_total, digest_yes, digest_yes1, digest_yes2;
-__attribute__((__destructor__))
-void digest_print (void)
-{
-  if (!digest_total)
-    return;
-  printf("Set digest summary: both %%%ld first %%%ld second %%%ld\n",
-        100 * digest_yes / digest_total,
-        100 * digest_yes1 / digest_total,
-        100 * digest_yes2 / digest_total);
-}
-#endif
-
 /* Public API */