From 97aa1ce6ba7e5a1d2816600449b5b5406e618abb Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 29 May 2022 10:32:59 -0600 Subject: [PATCH] [gsubgpos] Move some member initialization --- src/hb-ot-layout-gsubgpos.hh | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index d45499fd4..94080822f 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -631,27 +631,23 @@ struct hb_ot_apply_context_t : VariationStore::cache_t *var_store_cache; hb_direction_t direction; - hb_mask_t lookup_mask; - unsigned int lookup_index; - unsigned int lookup_props; - unsigned int nesting_level_left; + hb_mask_t lookup_mask = 1; + unsigned int lookup_index = (unsigned) -1; + unsigned int lookup_props = 0; + unsigned int nesting_level_left = HB_MAX_NESTING_LEVEL; bool has_glyph_classes; - bool auto_zwnj; - bool auto_zwj; - bool per_syllable; - bool random; - - uint32_t random_state; - + bool auto_zwnj = true; + bool auto_zwj = true; + bool per_syllable = false; + bool random = false; + uint32_t random_state = 1; hb_ot_apply_context_t (unsigned int table_index_, hb_font_t *font_, hb_buffer_t *buffer_) : - iter_input (), iter_context (), table_index (table_index_), font (font_), face (font->face), buffer (buffer_), - recurse_func (nullptr), gdef ( #ifndef HB_NO_OT_LAYOUT *face->table.GDEF->table @@ -668,16 +664,7 @@ struct hb_ot_apply_context_t : #endif ), direction (buffer_->props.direction), - lookup_mask (1), - lookup_index ((unsigned int) -1), - lookup_props (0), - nesting_level_left (HB_MAX_NESTING_LEVEL), - has_glyph_classes (gdef.has_glyph_classes ()), - auto_zwnj (true), - auto_zwj (true), - per_syllable (false), - random (false), - random_state (1) + has_glyph_classes (gdef.has_glyph_classes ()) { init_iters (); } ~hb_ot_apply_context_t ()