From c13ff395201cf20af0f91c38f08908a1c1570b0b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 8 Jun 2022 06:25:23 -0600 Subject: [PATCH] [layout] Rename apply_recurse_func to specialization of dispatch_recurse_func --- src/OT/Layout/GSUB/SubstLookup.hh | 2 -- src/hb-ot-layout-gpos-table.hh | 5 ++--- src/hb-ot-layout-gsub-table.hh | 3 ++- src/hb-ot-layout.cc | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/OT/Layout/GSUB/SubstLookup.hh b/src/OT/Layout/GSUB/SubstLookup.hh index 3419b5a73..b7299501f 100644 --- a/src/OT/Layout/GSUB/SubstLookup.hh +++ b/src/OT/Layout/GSUB/SubstLookup.hh @@ -100,8 +100,6 @@ struct SubstLookup : Lookup return dispatch (c); } - static inline bool apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index); - bool serialize_single (hb_serialize_context_t *c, uint32_t lookup_props, hb_sorted_array_t glyphs, diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index 0dbfa016a..6aa0966ec 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -2931,8 +2931,6 @@ struct PosLookup : Lookup dispatch (&c); } - static inline bool apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index); - template static typename context_t::return_t dispatch_recurse_func (context_t *c, unsigned int lookup_index); @@ -3128,7 +3126,8 @@ template return l.closure_lookups (c, this_index); } -/*static*/ bool PosLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index) +template <> +inline bool PosLookup::dispatch_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index) { const PosLookup &l = c->face->table.GPOS.get_relaxed ()->table->get_lookup (lookup_index); unsigned int saved_lookup_props = c->lookup_props; diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index bef381430..59a638a5e 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -65,7 +65,8 @@ template return l.closure_lookups (c, this_index); } -/*static*/ bool SubstLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index) +template <> +inline bool SubstLookup::dispatch_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index) { const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index); unsigned int saved_lookup_props = c->lookup_props; diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index addd4dad1..aa5321362 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -1916,7 +1916,7 @@ inline void hb_ot_map_t::apply (const Proxy &proxy, const unsigned int table_index = proxy.table_index; unsigned int i = 0; OT::hb_ot_apply_context_t c (table_index, font, buffer); - c.set_recurse_func (Proxy::Lookup::apply_recurse_func); + c.set_recurse_func (Proxy::Lookup::template dispatch_recurse_func); for (unsigned int stage_index = 0; stage_index < stages[table_index].length; stage_index++) {