Skip to content
Snippets Groups Projects
Commit 516f18f9 authored by Jean Chalard's avatar Jean Chalard
Browse files

Small performance fix.

This improves performance by not allocating an iterator.

Change-Id: I5511fd8b8d3aa826917620c0af994dbaf1562bb1
parent e968ad8a
No related branches found
No related tags found
No related merge requests found
...@@ -54,8 +54,8 @@ public class DictionaryCollection extends Dictionary { ...@@ -54,8 +54,8 @@ public class DictionaryCollection extends Dictionary {
@Override @Override
public boolean isValidWord(CharSequence word) { public boolean isValidWord(CharSequence word) {
for (final Dictionary dict : mDictionaries) for (int i = mDictionaries.size() - 1; i >= 0; --i)
if (dict.isValidWord(word)) return true; if (mDictionaries.get(i).isValidWord(word)) return true;
return false; return false;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment