[subset-cff] Avoid resetting buffer as encoder does
This commit is contained in:
parent
71aa10a394
commit
0761e7cdfd
|
@ -40,7 +40,7 @@ struct str_encoder_t
|
||||||
str_encoder_t (str_buff_t &buff_)
|
str_encoder_t (str_buff_t &buff_)
|
||||||
: buff (buff_), error (false) {}
|
: buff (buff_), error (false) {}
|
||||||
|
|
||||||
void reset () { buff.resize (0); }
|
void reset () { buff.reset (); }
|
||||||
|
|
||||||
void encode_byte (unsigned char b)
|
void encode_byte (unsigned char b)
|
||||||
{
|
{
|
||||||
|
@ -851,7 +851,6 @@ struct subr_subsetter_t
|
||||||
|
|
||||||
bool encode_str (const parsed_cs_str_t &str, const unsigned int fd, str_buff_t &buff) const
|
bool encode_str (const parsed_cs_str_t &str, const unsigned int fd, str_buff_t &buff) const
|
||||||
{
|
{
|
||||||
buff.reset ();
|
|
||||||
str_encoder_t encoder (buff);
|
str_encoder_t encoder (buff);
|
||||||
encoder.reset ();
|
encoder.reset ();
|
||||||
/* if a prefix (CFF1 width or CFF2 vsindex) has been removed along with hints,
|
/* if a prefix (CFF1 width or CFF2 vsindex) has been removed along with hints,
|
||||||
|
|
Loading…
Reference in New Issue