Merge pull request #96 from wangzhe258369/master

减少Visual Studio编译器警告
This commit is contained in:
Yanyi Wu 2017-06-28 00:02:16 +08:00 committed by GitHub
commit 6aff1f637c
2 changed files with 7 additions and 7 deletions

View File

@ -48,17 +48,17 @@ class FullSegment: public SegmentBase {
void Cut(RuneStrArray::const_iterator begin,
RuneStrArray::const_iterator end,
vector<WordRange>& res) const {
//resut of searching in trie tree
// resut of searching in trie tree
LocalVector<pair<size_t, const DictUnit*> > 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<struct Dag> dags;
dictTrie_->Find(begin, end, dags);

View File

@ -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();