From 9de413bf010d7a73082931ee081f595fa5e24acd Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 4 Jun 2023 17:43:48 -0600 Subject: [PATCH] [subset/cff1] Micro-optimize --- src/hb-subset-cff1.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hb-subset-cff1.cc b/src/hb-subset-cff1.cc index 4d22da03c..d9add1b8e 100644 --- a/src/hb-subset-cff1.cc +++ b/src/hb-subset-cff1.cc @@ -417,14 +417,14 @@ struct cff_subset_plan { unsigned int glyph; auto it = hb_iter (plan->new_to_old_gid_list); if (it->first == 0) it++; + auto _ = *it; for (glyph = 1; glyph < num_glyphs; glyph++) { hb_codepoint_t old_glyph; - auto &_ = *it; if (glyph == _.first) { old_glyph = _.second; - it++; + _ = *++it; } else { @@ -497,15 +497,15 @@ struct cff_subset_plan { unsigned num_glyphs = plan->num_output_glyphs (); auto it = hb_iter (plan->new_to_old_gid_list); if (it->first == 0) it++; + auto _ = *it; bool not_is_cid = !acc.is_CID (); for (glyph = 1; glyph < num_glyphs; glyph++) { hb_codepoint_t old_glyph; - auto &_ = *it; if (glyph == _.first) { old_glyph = _.second; - it++; + _ = *++it; } else {