[GSUB] Simplify Extension is_reverse()
We don't allow extension lookups to chain to another extension lookup. Simplify code for that.
This commit is contained in:
parent
858b627984
commit
dd3972a364
|
@ -239,7 +239,7 @@ struct ValueFormat : HBUINT16
|
|||
};
|
||||
|
||||
template<typename Iterator>
|
||||
static inline void SinglePos_serialize (hb_serialize_context_t *c,
|
||||
static void SinglePos_serialize (hb_serialize_context_t *c,
|
||||
Iterator it,
|
||||
ValueFormat valFormat);
|
||||
|
||||
|
@ -749,7 +749,7 @@ struct SinglePos
|
|||
};
|
||||
|
||||
template<typename Iterator>
|
||||
static inline void
|
||||
static void
|
||||
SinglePos_serialize (hb_serialize_context_t *c,
|
||||
Iterator it,
|
||||
ValueFormat valFormat)
|
||||
|
@ -2048,7 +2048,7 @@ struct GPOS_accelerator_t : GPOS::accelerator_t {};
|
|||
|
||||
#ifndef HB_NO_OT_LAYOUT
|
||||
template <typename context_t>
|
||||
/*static*/ inline typename context_t::return_t PosLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
|
||||
/*static*/ typename context_t::return_t PosLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
|
||||
{
|
||||
const PosLookup &l = c->face->table.GPOS.get_relaxed ()->table->get_lookup (lookup_index);
|
||||
return l.dispatch (c);
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace OT {
|
|||
typedef hb_pair_t<hb_codepoint_t, hb_codepoint_t> hb_codepoint_pair_t;
|
||||
|
||||
template<typename Iterator>
|
||||
static inline void SingleSubst_serialize (hb_serialize_context_t *c,
|
||||
static void SingleSubst_serialize (hb_serialize_context_t *c,
|
||||
Iterator it);
|
||||
|
||||
|
||||
|
@ -293,7 +293,7 @@ struct SingleSubst
|
|||
};
|
||||
|
||||
template<typename Iterator>
|
||||
static inline void
|
||||
static void
|
||||
SingleSubst_serialize (hb_serialize_context_t *c,
|
||||
Iterator it)
|
||||
{ c->start_embed<SingleSubst> ()->serialize (c, it); }
|
||||
|
@ -1114,7 +1114,6 @@ struct ChainContextSubst : ChainContext {};
|
|||
struct ExtensionSubst : Extension<ExtensionSubst>
|
||||
{
|
||||
typedef struct SubstLookupSubTable SubTable;
|
||||
|
||||
bool is_reverse () const;
|
||||
};
|
||||
|
||||
|
@ -1522,13 +1521,10 @@ struct GSUB_accelerator_t : GSUB::accelerator_t {};
|
|||
#ifndef HB_NO_OT_LAYOUT
|
||||
/*static*/ inline bool ExtensionSubst::is_reverse () const
|
||||
{
|
||||
unsigned int type = get_type ();
|
||||
if (unlikely (type == SubTable::Extension))
|
||||
return reinterpret_cast<const ExtensionSubst &> (get_subtable<SubTable>()).is_reverse ();
|
||||
return SubstLookup::lookup_type_is_reverse (type);
|
||||
return SubstLookup::lookup_type_is_reverse (get_type ());
|
||||
}
|
||||
template <typename context_t>
|
||||
/*static*/ inline typename context_t::return_t SubstLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
|
||||
/*static*/ typename context_t::return_t SubstLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
|
||||
{
|
||||
const SubstLookup &l = c->face->table.GSUB.get_relaxed ()->table->get_lookup (lookup_index);
|
||||
return l.dispatch (c);
|
||||
|
|
Loading…
Reference in New Issue