From 5fddc5f1698aa50e1be9cd729032c40fa5bd64b1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 20 Nov 2019 13:07:26 -0500 Subject: [PATCH] Use foreach_cluster --- src/hb-buffer.cc | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 6131c8617..6f62e3468 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -1860,18 +1860,8 @@ hb_buffer_normalize_glyphs (hb_buffer_t *buffer) bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction); - unsigned int count = buffer->len; - if (unlikely (!count)) return; - hb_glyph_info_t *info = buffer->info; - - unsigned int start = 0; - unsigned int end; - for (end = start + 1; end < count; end++) - if (info[start].cluster != info[end].cluster) { - normalize_glyphs_cluster (buffer, start, end, backward); - start = end; - } - normalize_glyphs_cluster (buffer, start, end, backward); + foreach_cluster (buffer, start, end) + normalize_glyphs_cluster (buffer, start, end, backward); } void