From b98c5db32d15fcfb27ce2f6737203ce1ad124319 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 16 Jul 2014 13:44:01 -0400 Subject: [PATCH] Minor refactoring --- src/hb-ot-layout-gsubgpos-private.hh | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index 470c3539..546ff4b0 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -349,11 +349,7 @@ struct hb_apply_context_t may_skip (const hb_apply_context_t *c, const hb_glyph_info_t &info) const { - unsigned int property; - - property = _hb_glyph_info_get_glyph_props (&info); - - if (!c->match_properties (info.codepoint, property, lookup_props)) + if (!c->check_glyph_property (&info, lookup_props)) return SKIP_YES; if (unlikely (_hb_glyph_info_is_default_ignorable (&info) && @@ -537,10 +533,12 @@ struct hb_apply_context_t } inline bool - match_properties (hb_codepoint_t glyph, - unsigned int glyph_props, - unsigned int lookup_props) const + check_glyph_property (const hb_glyph_info_t *info, + 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 * lookup_props includes LookupFlags::IgnoreLigatures */ @@ -553,17 +551,6 @@ struct hb_apply_context_t 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, unsigned int class_guess = 0, bool ligature = false, -- GitLab