[layout] Rename apply_recurse_func to specialization of dispatch_recurse_func

This commit is contained in:
Behdad Esfahbod 2022-06-08 06:25:23 -06:00
parent 6a1edb8c97
commit c13ff39520
4 changed files with 5 additions and 7 deletions

View File

@ -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<const HBGlyphID16> glyphs,

View File

@ -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 <typename context_t>
static typename context_t::return_t dispatch_recurse_func (context_t *c, unsigned int lookup_index);
@ -3128,7 +3126,8 @@ template <typename context_t>
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> (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;

View File

@ -65,7 +65,8 @@ template <typename context_t>
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> (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;

View File

@ -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<OT::hb_ot_apply_context_t>);
for (unsigned int stage_index = 0; stage_index < stages[table_index].length; stage_index++)
{