From e84d57426d4e3aacbfb285ad7d6bfbcbf7f2dc50 Mon Sep 17 00:00:00 2001 From: wyy Date: Sun, 30 Nov 2014 01:13:25 +0800 Subject: [PATCH] fix warnings --- src/Trie.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Trie.hpp b/src/Trie.hpp index 80a1f15..9cb3f57 100644 --- a/src/Trie.hpp +++ b/src/Trie.hpp @@ -112,7 +112,8 @@ namespace CppJieba const TrieNode * now = _root; //typename TrieNode::NextMap::const_iterator iter; const TrieNode* node; - for (size_t i = 0; i < end - begin; i++) + // compiler will complain warnings if only "i < end - begin" . + for (size_t i = 0; i < size_t(end - begin); i++) { Unicode::value_type ch = *(begin + i); res[i].uniCh = ch;