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

Optimization.

We already had that computed

Change-Id: I2a9742eaee2e9db1f73aeddda7bae7e237b4d15c
parent ec8b27fe
No related branches found
No related tags found
No related merge requests found
......@@ -413,11 +413,11 @@ public class Suggest {
// Check the last one's score and bail
if (suggestions.size() >= prefMaxSuggestions
&& suggestions.get(prefMaxSuggestions - 1).mScore >= score) return true;
final int length = Character.codePointCount(word, 0, word.length());
final int length = wordInfo.mCodePointCount;
while (pos < suggestions.size()) {
final int curScore = suggestions.get(pos).mScore;
if (curScore < score
|| (curScore == score && length < suggestions.get(pos).codePointCount())) {
|| (curScore == score && length < suggestions.get(pos).mCodePointCount)) {
break;
}
pos++;
......
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