From 377befd0c72071190029112ee04ab0a06fea60b6 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 10 May 2022 15:29:12 -0600 Subject: [PATCH] [cff] Convert get_seac_param_t to use constructor --- src/hb-ot-cff1-table.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/hb-ot-cff1-table.cc b/src/hb-ot-cff1-table.cc index 8bec26f27..a1a65a754 100644 --- a/src/hb-ot-cff1-table.cc +++ b/src/hb-ot-cff1-table.cc @@ -566,18 +566,13 @@ bool OT::cff1::accelerator_t::get_path (hb_font_t *font, hb_codepoint_t glyph, h struct get_seac_param_t { - void init (const OT::cff1::accelerator_t *_cff) - { - cff = _cff; - base = 0; - accent = 0; - } + get_seac_param_t (const OT::cff1::accelerator_t *_cff) : cff (_cff) {} bool has_seac () const { return base && accent; } const OT::cff1::accelerator_t *cff; - hb_codepoint_t base; - hb_codepoint_t accent; + hb_codepoint_t base = 0; + hb_codepoint_t accent = 0; }; struct cff1_cs_opset_seac_t : cff1_cs_opset_t @@ -601,8 +596,7 @@ bool OT::cff1::accelerator_t::get_seac_components (hb_codepoint_t glyph, hb_code cff1_cs_interpreter_t interp; const hb_ubytes_t str = (*charStrings)[glyph]; interp.env.init (str, *this, fd); - get_seac_param_t param; - param.init (this); + get_seac_param_t param (this); if (unlikely (!interp.interpret (param))) return false; if (param.has_seac ())