diff options
author | Peng Wu <alexepico@gmail.com> | 2016-06-01 13:59:27 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-06-01 13:59:27 +0800 |
commit | e8a0bb2c0e99460542f440a1bc5b1551bffc64bb (patch) | |
tree | d1ca9ce47491acd137948fdd35fea923a08c82a9 /src/lookup | |
parent | 27ec333e65de3fc881f9e62ae9c622353a0b173e (diff) | |
download | libpinyin-e8a0bb2c0e99460542f440a1bc5b1551bffc64bb.tar.gz |
fixes compile
Diffstat (limited to 'src/lookup')
-rw-r--r-- | src/lookup/pinyin_lookup2.cpp | 6 | ||||
-rw-r--r-- | src/lookup/pinyin_lookup2.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lookup/pinyin_lookup2.cpp b/src/lookup/pinyin_lookup2.cpp index 8d7d525..907b69d 100644 --- a/src/lookup/pinyin_lookup2.cpp +++ b/src/lookup/pinyin_lookup2.cpp @@ -609,7 +609,7 @@ bool PinyinLookup2::train_result2(PhoneticKeyMatrix * matrix, } /* compute the position of next token. */ - size_t next_pos = i + 1; + guint next_pos = i + 1; for (; next_pos < constraints->len; ++next_pos) { phrase_token_t next_token = g_array_index (results, phrase_token_t, next_pos); @@ -663,7 +663,7 @@ int PinyinLookup2::add_constraint(CandidateConstraints constraints, } bool PinyinLookup2::clear_constraint(CandidateConstraints constraints, - int index) { + size_t index) { if (index < 0 || index >= constraints->len) return false; @@ -681,7 +681,7 @@ bool PinyinLookup2::clear_constraint(CandidateConstraints constraints, /* now var constraint points to the one step constraint. */ assert(constraint->m_type == CONSTRAINT_ONESTEP); - phrase_token_t token = constraint->m_token; + /* phrase_token_t token = constraint->m_token; */ size_t end = constraint->m_end; for (size_t i = index; i < end; ++i){ if (i >= constraints->len) diff --git a/src/lookup/pinyin_lookup2.h b/src/lookup/pinyin_lookup2.h index 19f0313..ac4bdaa 100644 --- a/src/lookup/pinyin_lookup2.h +++ b/src/lookup/pinyin_lookup2.h @@ -224,7 +224,7 @@ public: * Clear one constraint in the constraints on the guessed sentence. * */ - bool clear_constraint(CandidateConstraints constraints, int index); + bool clear_constraint(CandidateConstraints constraints, size_t index); /** * PinyinLookup2::validate_constraint: |