Merge "Change the first character check in bigram dictionary to be case insensitive."

This commit is contained in:
Tom Ouyang 2012-03-26 02:17:12 -07:00 committed by Android (Google) Code Review
commit 94a2ac68e6

View file

@ -151,8 +151,9 @@ bool BigramDictionary::checkFirstCharacter(unsigned short *word) {
int *inputCodes = mInputCodes; int *inputCodes = mInputCodes;
int maxAlt = MAX_ALTERNATIVES; int maxAlt = MAX_ALTERNATIVES;
const unsigned short firstBaseChar = toBaseLowerCase(*word);
while (maxAlt > 0) { while (maxAlt > 0) {
if ((unsigned int) *inputCodes == (unsigned int) *word) { if (toBaseLowerCase(*inputCodes) == firstBaseChar) {
return true; return true;
} }
inputCodes++; inputCodes++;