]> code.bitgloo.com Git - clyne/arabtype.git/commitdiff
simplifying is_arabic_letter
authorbanx <banxoo+github@gmail.com>
Sat, 28 Dec 2013 14:24:54 +0000 (06:24 -0800)
committerbanx <banxoo+github@gmail.com>
Sat, 28 Dec 2013 14:24:54 +0000 (06:24 -0800)
arabtype.c

index d9ac78d350077d8f58055aa99a100c08a6f7231c..9971078e69d94598659c36a1ddb63b8e434cd8bc 100644 (file)
@@ -71,14 +71,12 @@ char_form   arabic_forms_b[]        =
 
 bool is_arabic_letter(uint32_t cp)
 {
-       if( cp >= ARABIC_LETTER_START && cp <=  ARABIC_LETTER_END )
-               return true;
-       return false;
+       return ( cp >= ARABIC_LETTER_START && cp <=  ARABIC_LETTER_END );
 }
 
 bool is_linking_type(uint32_t cp)
 {
-       if( cp >= ARABIC_LETTER_START && cp <=  ARABIC_LETTER_END )
+       if is_arabic_letter(cp)
                if( arabic_forms_b[cp - ARABIC_LETTER_START][INITIAL] || arabic_forms_b[cp - ARABIC_LETTER_START][MEDIAL] )
                        return true;
        return false;