From 7a60f4e3a407cdadedc3b723eb2f1d716e99cd72 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 12 Feb 2021 14:14:17 -0700 Subject: [PATCH] [subset] Remove debug burden Fixes https://github.com/harfbuzz/harfbuzz/issues/2360 --- src/hb-subset-plan.hh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/hb-subset-plan.hh b/src/hb-subset-plan.hh index e9f603dd1..cc9cb7a1a 100644 --- a/src/hb-subset-plan.hh +++ b/src/hb-subset-plan.hh @@ -172,12 +172,15 @@ struct hb_subset_plan_t add_table (hb_tag_t tag, hb_blob_t *contents) { - hb_blob_t *source_blob = source->reference_table (tag); - DEBUG_MSG(SUBSET, nullptr, "add table %c%c%c%c, dest %d bytes, source %d bytes", - HB_UNTAG(tag), - hb_blob_get_length (contents), - hb_blob_get_length (source_blob)); - hb_blob_destroy (source_blob); + if (HB_DEBUG_SUBSET) + { + hb_blob_t *source_blob = source->reference_table (tag); + DEBUG_MSG(SUBSET, nullptr, "add table %c%c%c%c, dest %d bytes, source %d bytes", + HB_UNTAG(tag), + hb_blob_get_length (contents), + hb_blob_get_length (source_blob)); + hb_blob_destroy (source_blob); + } return hb_face_builder_add_table (dest, tag, contents); } };