diff --git a/src/gen-vowel-constraints.py b/src/gen-vowel-constraints.py index 44f4a27ab..2abbbaeca 100755 --- a/src/gen-vowel-constraints.py +++ b/src/gen-vowel-constraints.py @@ -223,11 +223,7 @@ print (' default:') print (' break;') print (' }') print (' if (processed)') -print (' {') -print (' if (buffer->idx < count)') -print (' buffer->next_glyph ();') print (' buffer->swap_buffers ();') -print (' }') print ('}') print () diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index fb2cc8359..3e83673c8 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -835,11 +835,7 @@ struct StateTableDriver } if (!c->in_place) - { - for (; buffer->successful && buffer->idx < buffer->len;) - buffer->next_glyph (); buffer->swap_buffers (); - } } public: diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 4dcc95660..2e0e3f5f6 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -333,6 +333,9 @@ hb_buffer_t::swap_buffers () { if (unlikely (!successful)) return; + assert (idx <= len); + next_glyphs (len - idx); + assert (have_output); have_output = false; diff --git a/src/hb-ot-shape-complex-vowel-constraints.cc b/src/hb-ot-shape-complex-vowel-constraints.cc index 1af546e4f..9f8f17f1a 100644 --- a/src/hb-ot-shape-complex-vowel-constraints.cc +++ b/src/hb-ot-shape-complex-vowel-constraints.cc @@ -452,11 +452,7 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED, break; } if (processed) - { - if (buffer->idx < count) - buffer->next_glyph (); buffer->swap_buffers (); - } } diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 7d9055845..92831e022 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -535,8 +535,6 @@ hb_insert_dotted_circle (hb_buffer_t *buffer, hb_font_t *font) info.cluster = buffer->cur().cluster; info.mask = buffer->cur().mask; buffer->output_info (info); - while (buffer->idx < buffer->len && buffer->successful) - buffer->next_glyph (); buffer->swap_buffers (); }