From 3807061d634b60bd6235d6e1d8c47a034377f924 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 12 Jul 2021 17:02:03 -0600 Subject: [PATCH] [ot-layout] Don't remove_output() before reverse substitution No need anymore, because of new swap_buffers() semantics. Just assert instead. --- src/hb-buffer.cc | 10 ---------- src/hb-buffer.hh | 1 - src/hb-ot-layout.cc | 4 +--- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 583137a58..82aeaae0f 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -281,16 +281,6 @@ hb_buffer_t::add_info (const hb_glyph_info_t &glyph_info) } -void -hb_buffer_t::remove_output () -{ - have_output = false; - have_positions = false; - - out_len = 0; - out_info = info; -} - void hb_buffer_t::clear_output () { diff --git a/src/hb-buffer.hh b/src/hb-buffer.hh index 33d6e6c66..67429df23 100644 --- a/src/hb-buffer.hh +++ b/src/hb-buffer.hh @@ -209,7 +209,6 @@ struct hb_buffer_t HB_INTERNAL void guess_segment_properties (); HB_INTERNAL void swap_buffers (); - HB_INTERNAL void remove_output (); HB_INTERNAL void clear_output (); HB_INTERNAL void clear_positions (); diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 85795556f..cb428fba8 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -1900,10 +1900,8 @@ apply_string (OT::hb_ot_apply_context_t *c, else { /* in-place backward substitution/positioning */ - if (Proxy::table_index == 0u) - buffer->remove_output (); + assert (!buffer->have_output); buffer->idx = buffer->len - 1; - apply_backward (c, accel); } }