diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index f186917fc..75d523f5f 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -820,7 +820,6 @@ struct hb_aat_apply_context_t : /* Unused. For debug tracing only. */ unsigned int lookup_index; - unsigned int debug_depth; HB_INTERNAL hb_aat_apply_context_t (const hb_ot_shape_plan_t *plan_, hb_font_t *font_, diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc index 49c908fd1..aa753cb86 100644 --- a/src/hb-aat-layout.cc +++ b/src/hb-aat-layout.cc @@ -56,8 +56,7 @@ AAT::hb_aat_apply_context_t::hb_aat_apply_context_t (const hb_ot_shape_plan_t *p buffer (buffer_), sanitizer (), ankr_table (&Null (AAT::ankr)), - lookup_index (0), - debug_depth (0) + lookup_index (0) { sanitizer.init (blob); sanitizer.set_num_glyphs (face->get_num_glyphs ()); diff --git a/src/hb-dispatch.hh b/src/hb-dispatch.hh index 327770a89..7eace86e5 100644 --- a/src/hb-dispatch.hh +++ b/src/hb-dispatch.hh @@ -38,13 +38,13 @@ template struct hb_dispatch_context_t { + hb_dispatch_context_t () : debug_depth (0) {} private: /* https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern */ const Context* thiz () const { return static_cast (this); } Context* thiz () { return static_cast< Context *> (this); } public: const char *get_name () { return "UNKNOWN"; } - static constexpr unsigned debug_depth = 0; static constexpr unsigned max_debug_depth = MaxDebugDepth; typedef Return return_t; template @@ -54,6 +54,7 @@ struct hb_dispatch_context_t { return obj.dispatch (thiz (), hb_forward (ds)...); } static return_t no_dispatch_return_value () { return Context::default_return_value (); } static bool stop_sublookup_iteration (const return_t r HB_UNUSED) { return false; } + unsigned debug_depth; }; diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 37f1d23bd..07b370691 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -126,7 +126,6 @@ struct hb_subset_layout_context_t : const hb_tag_t table_tag; const hb_map_t *lookup_index_map; const hb_map_t *feature_index_map; - unsigned debug_depth; hb_subset_layout_context_t (hb_subset_context_t *c_, hb_tag_t tag_, @@ -136,7 +135,6 @@ struct hb_subset_layout_context_t : table_tag (tag_), lookup_index_map (lookup_map_), feature_index_map (feature_map_), - debug_depth (0), script_count (0), langsys_count (0), feature_index_count (0), diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index e935a9505..8b0e4323c 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -530,7 +530,6 @@ struct hb_ot_apply_context_t : unsigned int lookup_index; unsigned int lookup_props; unsigned int nesting_level_left; - unsigned int debug_depth; bool has_glyph_classes; bool auto_zwnj; @@ -560,7 +559,6 @@ struct hb_ot_apply_context_t : lookup_index ((unsigned int) -1), lookup_props (0), nesting_level_left (HB_MAX_NESTING_LEVEL), - debug_depth (0), has_glyph_classes (gdef.has_glyph_classes ()), auto_zwnj (true), auto_zwj (true), @@ -728,11 +726,9 @@ struct hb_get_subtables_context_t : static return_t default_return_value () { return hb_empty_t (); } hb_get_subtables_context_t (array_t &array_) : - array (array_), - debug_depth (0) {} + array (array_) {} array_t &array; - unsigned int debug_depth; }; diff --git a/src/hb-sanitize.hh b/src/hb-sanitize.hh index 091b3010f..024b4d1c9 100644 --- a/src/hb-sanitize.hh +++ b/src/hb-sanitize.hh @@ -121,7 +121,6 @@ struct hb_sanitize_context_t : hb_dispatch_context_t { hb_sanitize_context_t () : - debug_depth (0), start (nullptr), end (nullptr), max_ops (0), max_subtables (0), writable (false), edit_count (0), @@ -387,7 +386,6 @@ struct hb_sanitize_context_t : return sanitize_blob (hb_face_reference_table (face, tableTag)); } - mutable unsigned int debug_depth; const char *start, *end; mutable int max_ops, max_subtables; private: diff --git a/src/hb-subset.hh b/src/hb-subset.hh index dc86f150c..c9b01c67f 100644 --- a/src/hb-subset.hh +++ b/src/hb-subset.hh @@ -58,7 +58,6 @@ struct hb_subset_context_t : hb_subset_plan_t *plan; hb_serialize_context_t *serializer; hb_tag_t table_tag; - unsigned int debug_depth; hb_subset_context_t (hb_blob_t *source_blob_, hb_subset_plan_t *plan_, @@ -67,8 +66,7 @@ struct hb_subset_context_t : source_blob (source_blob_), plan (plan_), serializer (serializer_), - table_tag (table_tag_), - debug_depth (0) {} + table_tag (table_tag_) {} };