From 54544f2a57373b2d74bda55d4a48f58a0121c22c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 10 May 2022 15:31:49 -0600 Subject: [PATCH] [cff] Convert cff1_extents_param_t to use constructor --- src/hb-ot-cff1-table.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/hb-ot-cff1-table.cc b/src/hb-ot-cff1-table.cc index a1a65a754..d02c7122c 100644 --- a/src/hb-ot-cff1-table.cc +++ b/src/hb-ot-cff1-table.cc @@ -311,10 +311,8 @@ struct bounds_t struct cff1_extents_param_t { - void init (const OT::cff1::accelerator_t *_cff) + cff1_extents_param_t (const OT::cff1::accelerator_t *_cff) : cff (_cff) { - path_open = false; - cff = _cff; bounds.init (); } @@ -322,7 +320,7 @@ struct cff1_extents_param_t void end_path () { path_open = false; } bool is_path_open () const { return path_open; } - bool path_open; + bool path_open = false; bounds_t bounds; const OT::cff1::accelerator_t *cff; @@ -399,8 +397,7 @@ bool _get_bounds (const OT::cff1::accelerator_t *cff, hb_codepoint_t glyph, boun const hb_ubytes_t str = (*cff->charStrings)[glyph]; interp.env.init (str, *cff, fd); interp.env.set_in_seac (in_seac); - cff1_extents_param_t param; - param.init (cff); + cff1_extents_param_t param (cff); if (unlikely (!interp.interpret (param))) return false; bounds = param.bounds; return true;