diff --git a/include/cppjieba/FullSegment.hpp b/include/cppjieba/FullSegment.hpp index fc7aab2..ef314d7 100644 --- a/include/cppjieba/FullSegment.hpp +++ b/include/cppjieba/FullSegment.hpp @@ -48,17 +48,17 @@ class FullSegment: public SegmentBase { void Cut(RuneStrArray::const_iterator begin, RuneStrArray::const_iterator end, vector& res) const { - //resut of searching in trie tree + // resut of searching in trie tree LocalVector > tRes; - //max index of res's words - int maxIdx = 0; + // max index of res's words + size_t maxIdx = 0; // always equals to (uItr - begin) - int uIdx = 0; + size_t uIdx = 0; - //tmp variables - int wordLen = 0; + // tmp variables + size_t wordLen = 0; assert(dictTrie_); vector dags; dictTrie_->Find(begin, end, dags); diff --git a/include/cppjieba/Unicode.hpp b/include/cppjieba/Unicode.hpp index 87de505..b064c4a 100644 --- a/include/cppjieba/Unicode.hpp +++ b/include/cppjieba/Unicode.hpp @@ -142,7 +142,7 @@ inline RuneStrLite DecodeRuneInString(const char* str, size_t len) { inline bool DecodeRunesInString(const char* s, size_t len, RuneStrArray& runes) { runes.clear(); runes.reserve(len / 2); - for (size_t i = 0, j = 0; i < len;) { + for (uint32_t i = 0, j = 0; i < len;) { RuneStrLite rp = DecodeRuneInString(s + i, len - i); if (rp.len == 0) { runes.clear();