提交 b98c5db3 编写于 作者: B Behdad Esfahbod

Minor refactoring

上级 844f1a48
...@@ -349,11 +349,7 @@ struct hb_apply_context_t ...@@ -349,11 +349,7 @@ struct hb_apply_context_t
may_skip (const hb_apply_context_t *c, may_skip (const hb_apply_context_t *c,
const hb_glyph_info_t &info) const const hb_glyph_info_t &info) const
{ {
unsigned int property; if (!c->check_glyph_property (&info, lookup_props))
property = _hb_glyph_info_get_glyph_props (&info);
if (!c->match_properties (info.codepoint, property, lookup_props))
return SKIP_YES; return SKIP_YES;
if (unlikely (_hb_glyph_info_is_default_ignorable (&info) && if (unlikely (_hb_glyph_info_is_default_ignorable (&info) &&
...@@ -537,10 +533,12 @@ struct hb_apply_context_t ...@@ -537,10 +533,12 @@ struct hb_apply_context_t
} }
inline bool inline bool
match_properties (hb_codepoint_t glyph, check_glyph_property (const hb_glyph_info_t *info,
unsigned int glyph_props, unsigned int lookup_props) const
unsigned int lookup_props) const
{ {
hb_codepoint_t glyph = info->codepoint;
unsigned int glyph_props = _hb_glyph_info_get_glyph_props (info);
/* Not covered, if, for example, glyph class is ligature and /* Not covered, if, for example, glyph class is ligature and
* lookup_props includes LookupFlags::IgnoreLigatures * lookup_props includes LookupFlags::IgnoreLigatures
*/ */
...@@ -553,17 +551,6 @@ struct hb_apply_context_t ...@@ -553,17 +551,6 @@ struct hb_apply_context_t
return true; return true;
} }
inline bool
check_glyph_property (hb_glyph_info_t *info,
unsigned int lookup_props) const
{
unsigned int property;
property = _hb_glyph_info_get_glyph_props (info);
return match_properties (info->codepoint, property, lookup_props);
}
inline void _set_glyph_props (hb_codepoint_t glyph_index, inline void _set_glyph_props (hb_codepoint_t glyph_index,
unsigned int class_guess = 0, unsigned int class_guess = 0,
bool ligature = false, bool ligature = false,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册