[cff] Convert get_seac_param_t to use constructor
This commit is contained in:
parent
8fd70362fa
commit
377befd0c7
|
@ -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<cff1_cs_opset_seac_t, get_seac_param_t>
|
||||
|
@ -601,8 +596,7 @@ bool OT::cff1::accelerator_t::get_seac_components (hb_codepoint_t glyph, hb_code
|
|||
cff1_cs_interpreter_t<cff1_cs_opset_seac_t, get_seac_param_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 ())
|
||||
|
|
Loading…
Reference in New Issue