From 7b08b0a7f2057937dfc3ab2ec191656bf2386463 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 20 Jul 2011 23:59:07 -0400 Subject: [PATCH] Minor --- src/hb-ot-shape-complex-arabic.cc | 8 ++++---- src/hb-private.hh | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc index 9720f7ab9..53e7a9b64 100644 --- a/src/hb-ot-shape-complex-arabic.cc +++ b/src/hb-ot-shape-complex-arabic.cc @@ -61,25 +61,25 @@ static unsigned int get_joining_type (hb_codepoint_t u, hb_unicode_general_categ { /* TODO Macroize the magic bit operations */ - if (likely (JOINING_TABLE_FIRST <= u && u <= JOINING_TABLE_LAST)) { + if (likely (hb_codepoint_in_range (u, JOINING_TABLE_FIRST, JOINING_TABLE_LAST))) { unsigned int j_type = joining_table[u - JOINING_TABLE_FIRST]; if (likely (j_type != JOINING_TYPE_X)) return j_type; } /* Mongolian joining data is not in ArabicJoining.txt yet */ - if (unlikely (0x1800 <= u && u <= 0x18AF)) + if (unlikely (hb_codepoint_in_range (u, 0x1800, 0x18AF))) { /* All letters, SIBE SYLLABLE BOUNDARY MARKER, and NIRUGU are D */ if (gen_cat == HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER || u == 0x1807 || u == 0x180A) return JOINING_TYPE_D; } - if (unlikely ((u & ~(0x200C^0x200D)) == 0x200C)) { + if (unlikely (hb_codepoint_in_range (u, 0x200C, 0x200D))) { return u == 0x200C ? JOINING_TYPE_U : JOINING_TYPE_C; } - return ((1<