From: banx Date: Sat, 28 Dec 2013 14:24:54 +0000 (-0800) Subject: simplifying is_arabic_letter X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=39b07a4031b0e25078859c4b65649d7b92ec0092;p=clyne%2Farabtype.git simplifying is_arabic_letter --- diff --git a/arabtype.c b/arabtype.c index d9ac78d..9971078 100644 --- a/arabtype.c +++ b/arabtype.c @@ -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;