提交 2cc993e0 编写于 作者: B Behdad Esfahbod

[dispatch] Minor

上级 602fbfe3
...@@ -1535,7 +1535,6 @@ struct PosLookupSubTable ...@@ -1535,7 +1535,6 @@ struct PosLookupSubTable
inline typename context_t::return_t dispatch (context_t *c, unsigned int lookup_type) const inline typename context_t::return_t dispatch (context_t *c, unsigned int lookup_type) const
{ {
TRACE_DISPATCH (this, lookup_type); TRACE_DISPATCH (this, lookup_type);
if (unlikely (!c->may_dispatch (this, &u.sub_format))) return_trace (c->no_dispatch_return_value ());
switch (lookup_type) { switch (lookup_type) {
case Single: return_trace (u.single.dispatch (c)); case Single: return_trace (u.single.dispatch (c));
case Pair: return_trace (u.pair.dispatch (c)); case Pair: return_trace (u.pair.dispatch (c));
...@@ -1552,7 +1551,6 @@ struct PosLookupSubTable ...@@ -1552,7 +1551,6 @@ struct PosLookupSubTable
protected: protected:
union { union {
HBUINT16 sub_format;
SinglePos single; SinglePos single;
PairPos pair; PairPos pair;
CursivePos cursive; CursivePos cursive;
...@@ -1564,7 +1562,7 @@ struct PosLookupSubTable ...@@ -1564,7 +1562,7 @@ struct PosLookupSubTable
ExtensionPos extension; ExtensionPos extension;
} u; } u;
public: public:
DEFINE_SIZE_UNION (2, sub_format); DEFINE_SIZE_MIN (0);
}; };
......
...@@ -1273,7 +1273,6 @@ struct SubstLookupSubTable ...@@ -1273,7 +1273,6 @@ struct SubstLookupSubTable
inline typename context_t::return_t dispatch (context_t *c, unsigned int lookup_type) const inline typename context_t::return_t dispatch (context_t *c, unsigned int lookup_type) const
{ {
TRACE_DISPATCH (this, lookup_type); TRACE_DISPATCH (this, lookup_type);
if (unlikely (!c->may_dispatch (this, &u.sub_format))) return_trace (c->no_dispatch_return_value ());
switch (lookup_type) { switch (lookup_type) {
case Single: return_trace (u.single.dispatch (c)); case Single: return_trace (u.single.dispatch (c));
case Multiple: return_trace (u.multiple.dispatch (c)); case Multiple: return_trace (u.multiple.dispatch (c));
...@@ -1289,7 +1288,6 @@ struct SubstLookupSubTable ...@@ -1289,7 +1288,6 @@ struct SubstLookupSubTable
protected: protected:
union { union {
HBUINT16 sub_format;
SingleSubst single; SingleSubst single;
MultipleSubst multiple; MultipleSubst multiple;
AlternateSubst alternate; AlternateSubst alternate;
...@@ -1300,7 +1298,7 @@ struct SubstLookupSubTable ...@@ -1300,7 +1298,7 @@ struct SubstLookupSubTable
ReverseChainSingleSubst reverseChainContextSingle; ReverseChainSingleSubst reverseChainContextSingle;
} u; } u;
public: public:
DEFINE_SIZE_UNION (2, sub_format); DEFINE_SIZE_MIN (0);
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册