diff options
author | 2012-06-26 20:02:07 +0900 | |
---|---|---|
committer | 2012-06-26 20:02:07 +0900 | |
commit | 22657dcba07fc54919020119408cb71d187a14fd (patch) | |
tree | 390a92a2c6a00df221d09fead87ac8fe029f0cc6 /java/src | |
parent | ec8b27fe49bd0a149cf7dcd36d1b0d966b03a3b5 (diff) | |
download | latinime-22657dcba07fc54919020119408cb71d187a14fd.tar.gz latinime-22657dcba07fc54919020119408cb71d187a14fd.tar.xz latinime-22657dcba07fc54919020119408cb71d187a14fd.zip |
Optimization.
We already had that computed
Change-Id: I2a9742eaee2e9db1f73aeddda7bae7e237b4d15c
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Suggest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 3289d6a23..851066de5 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -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++; |