Add a shortcut for common non-CJK characters...

...(assuming compiler didn't guess it)

This also simplifies the reading of the CJK list.
This commit is contained in:
Ali El Gariani 2010-08-28 14:00:46 +00:00
parent d0455e5f1e
commit 371c159737

View File

@ -271,6 +271,9 @@ bool is_cjk_char(const wchar_t c)
const unsigned int ch = static_cast<unsigned int>(c);
//FIXME add range from Japanese-specific and Korean-specific section if you know the characters are used today.
if (ch < 0x2e80) return false; // shorcut for common non-CJK
return
//Han Ideographs: all except Supplement
(ch >= 0x4e00 && ch < 0x9fcf) ||