[cff-subset] Pre-alloc vector for operator decoding
This commit is contained in:
parent
7edd54f3dd
commit
f08537963b
|
@ -520,6 +520,11 @@ struct parsed_values_t
|
|||
}
|
||||
void fini () { values.fini (); }
|
||||
|
||||
void alloc (unsigned n)
|
||||
{
|
||||
values.alloc (n);
|
||||
}
|
||||
|
||||
void add_op (op_code_t op, const byte_str_ref_t& str_ref = byte_str_ref_t ())
|
||||
{
|
||||
VAL *val = values.push ();
|
||||
|
|
|
@ -569,6 +569,7 @@ struct subr_subsetter_t
|
|||
ENV env (str, acc, fd);
|
||||
cs_interpreter_t<ENV, OPSET, subr_subset_param_t> interp (env);
|
||||
|
||||
parsed_charstrings[i].alloc (str.length);
|
||||
subr_subset_param_t param (&parsed_charstrings[i],
|
||||
&parsed_global_subrs,
|
||||
&parsed_local_subrs[fd],
|
||||
|
|
Loading…
Reference in New Issue