From 9fb9be8d43262f46c8a639d80fa049dcb0e440f0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 12 Jan 2023 18:37:45 -0700 Subject: [PATCH] [os2] Rewrite a loop --- src/hb-ot-os2-table.hh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-os2-table.hh b/src/hb-ot-os2-table.hh index 22cdb652e..26cf6bd73 100644 --- a/src/hb-ot-os2-table.hh +++ b/src/hb-ot-os2-table.hh @@ -280,12 +280,13 @@ struct OS2 void _update_unicode_ranges (const hb_set_t *codepoints, HBUINT32 ulUnicodeRange[4]) const { - HBUINT32 newBits[4]; + HBUINT32 newBits[4]; for (unsigned int i = 0; i < 4; i++) newBits[i] = 0; - hb_codepoint_t cp = HB_SET_VALUE_INVALID; - while (codepoints->next (&cp)) { + for (hb_codepoint_t cp = HB_SET_VALUE_INVALID; + codepoints->next (&cp);) + { unsigned int bit = _hb_ot_os2_get_unicode_range_bit (cp); if (bit < 128) {