[subset-cff] Cosmetic
This commit is contained in:
parent
0b201623f5
commit
b5aa8a27ea
|
@ -851,9 +851,10 @@ 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
|
||||||
{
|
{
|
||||||
|
unsigned count = str.get_count ();
|
||||||
str_encoder_t encoder (buff);
|
str_encoder_t encoder (buff);
|
||||||
encoder.reset ();
|
encoder.reset ();
|
||||||
buff.alloc (str.get_count () * 3);
|
buff.alloc (count * 3);
|
||||||
/* 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,
|
||||||
* re-insert it at the beginning of charstreing */
|
* re-insert it at the beginning of charstreing */
|
||||||
if (str.has_prefix () && str.is_hint_dropped ())
|
if (str.has_prefix () && str.is_hint_dropped ())
|
||||||
|
@ -862,7 +863,7 @@ struct subr_subsetter_t
|
||||||
if (str.prefix_op () != OpCode_Invalid)
|
if (str.prefix_op () != OpCode_Invalid)
|
||||||
encoder.encode_op (str.prefix_op ());
|
encoder.encode_op (str.prefix_op ());
|
||||||
}
|
}
|
||||||
for (unsigned int i = 0; i < str.get_count(); i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
const parsed_cs_op_t &opstr = str.values[i];
|
const parsed_cs_op_t &opstr = str.values[i];
|
||||||
if (!opstr.for_drop () && !opstr.for_skip ())
|
if (!opstr.for_drop () && !opstr.for_skip ())
|
||||||
|
|
Loading…
Reference in New Issue