From 84ffb7e4771ae8c541a789049a4ffb1b1a963681 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 26 Feb 2025 12:51:04 -0700 Subject: [PATCH] [SimpleGlyph] Minor use an intermediate variable --- src/OT/glyf/SimpleGlyph.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/OT/glyf/SimpleGlyph.hh b/src/OT/glyf/SimpleGlyph.hh index 622faeb8e..c0f01405c 100644 --- a/src/OT/glyf/SimpleGlyph.hh +++ b/src/OT/glyf/SimpleGlyph.hh @@ -127,19 +127,20 @@ struct SimpleGlyph hb_array_t points_ /* IN/OUT */, const HBUINT8 *end) { + auto *points = points_.arrayZ; unsigned count = points_.length; for (unsigned int i = 0; i < count;) { if (unlikely (p + 1 > end)) return false; uint8_t flag = *p++; - points_.arrayZ[i++].flag = flag; + points[i++].flag = flag; if (flag & FLAG_REPEAT) { if (unlikely (p + 1 > end)) return false; unsigned int repeat_count = *p++; unsigned stop = hb_min (i + repeat_count, count); for (; i < stop; i++) - points_.arrayZ[i].flag = flag; + points[i].flag = flag; } } return true;