Small performance fix.

This improves performance by not allocating an iterator.

Change-Id: I5511fd8b8d3aa826917620c0af994dbaf1562bb1
This commit is contained in:
Jean Chalard 2011-06-16 20:05:46 +09:00
parent e968ad8ad1
commit 516f18f97e

View file

@ -54,8 +54,8 @@ public class DictionaryCollection extends Dictionary {
@Override
public boolean isValidWord(CharSequence word) {
for (final Dictionary dict : mDictionaries)
if (dict.isValidWord(word)) return true;
for (int i = mDictionaries.size() - 1; i >= 0; --i)
if (mDictionaries.get(i).isValidWord(word)) return true;
return false;
}