aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/unigram_dictionary.cpp
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-04-23 15:37:07 +0900
committerJean Chalard <jchalard@google.com>2012-04-23 16:05:36 +0900
commit522a04ea5b249d0af556647d2abcad57e5b99b4f (patch)
tree7bb086debeed66c3b2fd32137db9b2586532026f /native/jni/src/unigram_dictionary.cpp
parent0df78d46da1ef0d42196f3baa9d5f6df5932afb6 (diff)
downloadlatinime-522a04ea5b249d0af556647d2abcad57e5b99b4f.tar.gz
latinime-522a04ea5b249d0af556647d2abcad57e5b99b4f.tar.xz
latinime-522a04ea5b249d0af556647d2abcad57e5b99b4f.zip
Pass words as int[] to the native code.
We need to get the bigrams during the call to getSuggestions for bug#6313806. We already give an int[] to getSuggestions and we wanted to get rid of char[]'s anyway because it doesn't work with surrogate pairs, so here we go. Bug: 6313806 Change-Id: I56ce99f1db6b3302cdf42f0527343bded837091e
Diffstat (limited to 'native/jni/src/unigram_dictionary.cpp')
-rw-r--r--native/jni/src/unigram_dictionary.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/native/jni/src/unigram_dictionary.cpp b/native/jni/src/unigram_dictionary.cpp
index ab8570e6f..05c124b94 100644
--- a/native/jni/src/unigram_dictionary.cpp
+++ b/native/jni/src/unigram_dictionary.cpp
@@ -730,7 +730,7 @@ int UnigramDictionary::getMostFrequentWordLikeInner(const uint16_t * const inWor
return maxFreq;
}
-bool UnigramDictionary::isValidWord(const uint16_t* const inWord, const int length) const {
+bool UnigramDictionary::isValidWord(const int32_t* const inWord, const int length) const {
return NOT_VALID_WORD != BinaryFormat::getTerminalPosition(DICT_ROOT, inWord, length);
}