diff options
author | Peng Wu <alexepico@gmail.com> | 2016-07-01 10:56:22 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-07-01 10:56:22 +0800 |
commit | 6ac5b3b39db614be21c633d963575df5e06233bb (patch) | |
tree | b7e6f66701927c4f1a65e3e043f5d0ae6d96c2ba /src/pinyin.cpp | |
parent | 43d9edd91bbc0fbe76edccde6451efdfff021a4a (diff) | |
download | libpinyin-6ac5b3b39db614be21c633d963575df5e06233bb.tar.gz libpinyin-6ac5b3b39db614be21c633d963575df5e06233bb.tar.xz libpinyin-6ac5b3b39db614be21c633d963575df5e06233bb.zip |
fixes warnings
Diffstat (limited to 'src/pinyin.cpp')
-rw-r--r-- | src/pinyin.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp index 3522445..26653e8 100644 --- a/src/pinyin.cpp +++ b/src/pinyin.cpp @@ -3246,8 +3246,6 @@ bool pinyin_remember_user_input(pinyin_instance_t * instance, pinyin_context_t * context = instance->m_context; FacadePhraseIndex * phrase_index = context->m_phrase_index; FacadePhraseTable3 * phrase_table = context->m_phrase_table; - PhoneticKeyMatrix & matrix = instance->m_matrix; - guint8 index = USER_DICTIONARY; if (NULL == phrase) return false; @@ -3258,7 +3256,7 @@ bool pinyin_remember_user_input(pinyin_instance_t * instance, if (0 == phrase_length || phrase_length >= MAX_PHRASE_LENGTH) return false; - const size_t start = 0; const size_t end = matrix.size() - 1; + const size_t start = 0; ChewingKeyVector cached_keys = g_array_new(TRUE, TRUE, sizeof(ChewingKey)); /* pre-compute the tokens vector from phrase. */ @@ -3268,7 +3266,7 @@ bool pinyin_remember_user_input(pinyin_instance_t * instance, PhraseTokens tokens; memset(tokens, 0, sizeof(PhraseTokens)); phrase_index->prepare_tokens(tokens); - for (size_t i = 0; i < phrase_length; ++i) { + for (glong i = 0; i < phrase_length; ++i) { phrase_token_t token = null_token; ucs4_t character = phrase[i]; |