From 942a30b7df13dcc25fbad0b0f9218ffc77ced9ad Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 5 Feb 2025 14:21:49 +0000 Subject: [PATCH] [aat] Remove now-unused code --- src/hb-aat-layout-common.hh | 2 +- src/hb-aat-layout-morx-table.hh | 18 +----------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index d95a8c93b..e53a78e0b 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -88,7 +88,7 @@ struct hb_aat_apply_context_t : void set_lookup_index (unsigned int i) { lookup_index = i; } - void setup_buffer_glyph_set (unsigned subchain_count) + void setup_buffer_glyph_set () { using_buffer_glyph_set = buffer->len >= 4; diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index a975b79d8..6fa510b2c 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -1374,13 +1374,11 @@ struct mortmorx } this->chain_count = table->get_chain_count (); - this->subchain_count = table->get_subchain_count (); this->accels = (hb_atomic_ptr_t *) hb_calloc (this->chain_count, sizeof (*accels)); if (unlikely (!this->accels)) { this->chain_count = 0; - this->subchain_count = 0; this->table.destroy (); this->table = hb_blob_get_empty (); } @@ -1424,7 +1422,6 @@ struct mortmorx hb_blob_ptr_t table; unsigned int chain_count; - unsigned int subchain_count; hb_atomic_ptr_t *accels; }; @@ -1449,19 +1446,6 @@ struct mortmorx { return chainCount; } - unsigned get_subchain_count () const - { - const Chain *chain = &firstChain; - unsigned int count = chainCount; - unsigned int subchain_count = 0; - for (unsigned int i = 0; i < count; i++) - { - subchain_count += chain->get_subtable_count (); - chain = &StructAfter> (*chain); - } - return subchain_count; - } - void apply (hb_aat_apply_context_t *c, const hb_aat_map_t &map, const accelerator_t &accel) const @@ -1470,7 +1454,7 @@ struct mortmorx c->buffer->unsafe_to_concat (); - c->setup_buffer_glyph_set (accel.subchain_count); + c->setup_buffer_glyph_set (); c->set_lookup_index (0); const Chain *chain = &firstChain;