Loading native/jni/src/bigram_dictionary.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include "bigram_dictionary.h" #include "binary_format.h" #include "bloom_filter.h" #include "char_utils.h" #include "defines.h" #include "dictionary.h" Loading Loading @@ -50,7 +51,7 @@ void BigramDictionary::addWordBigram(int *word, int length, int frequency, int * int insertAt = 0; while (insertAt < MAX_RESULTS) { if (frequency > bigramFreq[insertAt] || (bigramFreq[insertAt] == frequency && length < Dictionary::wideStrLen( && length < getCodePointCount(MAX_WORD_LENGTH, bigramCodePoints + insertAt * MAX_WORD_LENGTH))) { break; } Loading native/jni/src/dictionary.h +0 −16 Original line number Diff line number Diff line Loading @@ -65,10 +65,6 @@ class Dictionary { int getDictBufAdjust() const { return mDictBufAdjust; } virtual ~Dictionary(); // public static utility methods // static inline methods should be defined in the header file static int wideStrLen(int *str); private: DISALLOW_IMPLICIT_CONSTRUCTORS(Dictionary); const uint8_t *mDict; Loading @@ -84,17 +80,5 @@ class Dictionary { const BigramDictionary *mBigramDictionary; SuggestInterface *mGestureSuggest; }; // public static utility methods // static inline methods should be defined in the header file inline int Dictionary::wideStrLen(int *str) { if (!str) return 0; int length = 0; while (*str) { str++; length++; } return length; } } // namespace latinime #endif // LATINIME_DICTIONARY_H Loading
native/jni/src/bigram_dictionary.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include "bigram_dictionary.h" #include "binary_format.h" #include "bloom_filter.h" #include "char_utils.h" #include "defines.h" #include "dictionary.h" Loading Loading @@ -50,7 +51,7 @@ void BigramDictionary::addWordBigram(int *word, int length, int frequency, int * int insertAt = 0; while (insertAt < MAX_RESULTS) { if (frequency > bigramFreq[insertAt] || (bigramFreq[insertAt] == frequency && length < Dictionary::wideStrLen( && length < getCodePointCount(MAX_WORD_LENGTH, bigramCodePoints + insertAt * MAX_WORD_LENGTH))) { break; } Loading
native/jni/src/dictionary.h +0 −16 Original line number Diff line number Diff line Loading @@ -65,10 +65,6 @@ class Dictionary { int getDictBufAdjust() const { return mDictBufAdjust; } virtual ~Dictionary(); // public static utility methods // static inline methods should be defined in the header file static int wideStrLen(int *str); private: DISALLOW_IMPLICIT_CONSTRUCTORS(Dictionary); const uint8_t *mDict; Loading @@ -84,17 +80,5 @@ class Dictionary { const BigramDictionary *mBigramDictionary; SuggestInterface *mGestureSuggest; }; // public static utility methods // static inline methods should be defined in the header file inline int Dictionary::wideStrLen(int *str) { if (!str) return 0; int length = 0; while (*str) { str++; length++; } return length; } } // namespace latinime #endif // LATINIME_DICTIONARY_H