From e7602afaac5935f3971e30dae22f326be8fca1c2 Mon Sep 17 00:00:00 2001 From: Wangzhe Date: Tue, 27 Jun 2017 23:00:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=8F=E5=B0=91Visual=20Studio=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E5=99=A8=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/cppjieba/FullSegment.hpp | 12 ++++++------ include/cppjieba/Unicode.hpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) 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();