[cff] Remove init/fini from number_t

This commit is contained in:
Behdad Esfahbod 2022-01-18 13:14:42 -07:00
parent 6ef83c2c31
commit 8d24ac2662
2 changed files with 2 additions and 14 deletions

View File

@ -217,9 +217,6 @@ inline unsigned int OpCode_Size (op_code_t op) { return Is_OpCode_ESC (op) ? 2:
struct number_t struct number_t
{ {
void init () { set_real (0.0); }
void fini () {}
void set_int (int v) { value = v; } void set_int (int v) { value = v; }
int to_int () const { return value; } int to_int () const { return value; }
@ -245,7 +242,7 @@ struct number_t
} }
protected: protected:
double value; double value = 0.;
}; };
/* byte string */ /* byte string */
@ -380,8 +377,6 @@ struct cff_stack_t
count = 0; count = 0;
elements.init (); elements.init ();
elements.resize (kSizeLimit); elements.resize (kSizeLimit);
for (unsigned int i = 0; i < elements.length; i++)
elements[i].init ();
} }
void fini () { elements.fini (); } void fini () { elements.fini (); }

View File

@ -94,12 +94,6 @@ struct biased_subrs_t
struct point_t struct point_t
{ {
void init ()
{
x.init ();
y.init ();
}
void set_int (int _x, int _y) void set_int (int _x, int _y)
{ {
x.set_int (_x); x.set_int (_x);
@ -128,7 +122,7 @@ struct cs_interp_env_t : interp_env_t<ARG>
hstem_count = 0; hstem_count = 0;
vstem_count = 0; vstem_count = 0;
hintmask_size = 0; hintmask_size = 0;
pt.init (); pt.set_int (0, 0);
callStack.init (); callStack.init ();
globalSubrs.init (globalSubrs_); globalSubrs.init (globalSubrs_);
localSubrs.init (localSubrs_); localSubrs.init (localSubrs_);
@ -841,7 +835,6 @@ struct path_procs_t
if (likely (env.argStack.get_count () == 11)) if (likely (env.argStack.get_count () == 11))
{ {
point_t d; point_t d;
d.init ();
for (unsigned int i = 0; i < 10; i += 2) for (unsigned int i = 0; i < 10; i += 2)
d.move (env.eval_arg (i), env.eval_arg (i+1)); d.move (env.eval_arg (i), env.eval_arg (i+1));