From 8d24ac26623f5645783b8e36e39c9f5c635e0191 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 18 Jan 2022 13:14:42 -0700 Subject: [PATCH] [cff] Remove init/fini from number_t --- src/hb-cff-interp-common.hh | 7 +------ src/hb-cff-interp-cs-common.hh | 9 +-------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/hb-cff-interp-common.hh b/src/hb-cff-interp-common.hh index b5e63f4fe..53c29f7e8 100644 --- a/src/hb-cff-interp-common.hh +++ b/src/hb-cff-interp-common.hh @@ -217,9 +217,6 @@ inline unsigned int OpCode_Size (op_code_t op) { return Is_OpCode_ESC (op) ? 2: struct number_t { - void init () { set_real (0.0); } - void fini () {} - void set_int (int v) { value = v; } int to_int () const { return value; } @@ -245,7 +242,7 @@ struct number_t } protected: - double value; + double value = 0.; }; /* byte string */ @@ -380,8 +377,6 @@ struct cff_stack_t count = 0; elements.init (); elements.resize (kSizeLimit); - for (unsigned int i = 0; i < elements.length; i++) - elements[i].init (); } void fini () { elements.fini (); } diff --git a/src/hb-cff-interp-cs-common.hh b/src/hb-cff-interp-cs-common.hh index 52d778ffe..ef299369b 100644 --- a/src/hb-cff-interp-cs-common.hh +++ b/src/hb-cff-interp-cs-common.hh @@ -94,12 +94,6 @@ struct biased_subrs_t struct point_t { - void init () - { - x.init (); - y.init (); - } - void set_int (int _x, int _y) { x.set_int (_x); @@ -128,7 +122,7 @@ struct cs_interp_env_t : interp_env_t hstem_count = 0; vstem_count = 0; hintmask_size = 0; - pt.init (); + pt.set_int (0, 0); callStack.init (); globalSubrs.init (globalSubrs_); localSubrs.init (localSubrs_); @@ -841,7 +835,6 @@ struct path_procs_t if (likely (env.argStack.get_count () == 11)) { point_t d; - d.init (); for (unsigned int i = 0; i < 10; i += 2) d.move (env.eval_arg (i), env.eval_arg (i+1));