QChar: optimize some methods a bit for general case
authorKonstantin Ritt <ritt.ks@gmail.com>
Tue, 10 Apr 2012 20:36:21 +0000 (23:36 +0300)
committerQt by Nokia <qt-info@nokia.com>
Wed, 11 Apr 2012 13:57:32 +0000 (15:57 +0200)
commit3ddd768504f9f55c04bec9beb8eb9bac9a7e5edc
treec9862091ee484ee676a8e0f915181637405c690e
parent7386ab17df94e58efeb2f2fba91b9f816834c077
QChar: optimize some methods a bit for general case

by reordering and regrouping conditions so that they lead to result earlier
in most-common usecases (l.letters, spaces and puncts, u.letters, other);
there are no title cased letters in range [0..127] -> use this in isTitleCase();
test for 0xa0 (nbsp) early in isSpace() as it is quite common in HTML, etc.;
add early test to isNumber().

Change-Id: Ib415f34cb1212d9ccf8753de2d1beaece1aa2243
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
src/corelib/tools/qchar.cpp
src/corelib/tools/qchar.h