From b5aa8a27eac851503eaee086912f269b51e68724 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 18 May 2022 11:58:58 -0600 Subject: [PATCH] [subset-cff] Cosmetic --- src/hb-subset-cff-common.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hb-subset-cff-common.hh b/src/hb-subset-cff-common.hh index a8921d852..0a24526f5 100644 --- a/src/hb-subset-cff-common.hh +++ b/src/hb-subset-cff-common.hh @@ -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 { + unsigned count = str.get_count (); str_encoder_t encoder (buff); 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, * re-insert it at the beginning of charstreing */ if (str.has_prefix () && str.is_hint_dropped ()) @@ -862,7 +863,7 @@ struct subr_subsetter_t if (str.prefix_op () != OpCode_Invalid) 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]; if (!opstr.for_drop () && !opstr.for_skip ())