summaryrefslogtreecommitdiffstats
path: root/src/storage/pinyin_parser2.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-11-23 15:18:49 +0800
committerPeng Wu <alexepico@gmail.com>2011-11-23 15:18:49 +0800
commit9f17bdefd4303242d017f2cd3e0ee3bfba819af2 (patch)
treed8f695a6d51059e83e179021a8e02887f043516b /src/storage/pinyin_parser2.cpp
parent0f7b939fd5f21689448881fda1c598162eda9b51 (diff)
downloadlibpinyin-9f17bdefd4303242d017f2cd3e0ee3bfba819af2.tar.gz
libpinyin-9f17bdefd4303242d017f2cd3e0ee3bfba819af2.tar.xz
libpinyin-9f17bdefd4303242d017f2cd3e0ee3bfba819af2.zip
begin to write chewing parser2
Diffstat (limited to 'src/storage/pinyin_parser2.cpp')
-rw-r--r--src/storage/pinyin_parser2.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp
index 16af6b3..b54e7f2 100644
--- a/src/storage/pinyin_parser2.cpp
+++ b/src/storage/pinyin_parser2.cpp
@@ -503,7 +503,9 @@ int DoublePinyinParser2::parse (guint32 options, ChewingKeyVector & keys,
int parsed_len = 0;
while (parsed_len < maximum_len) {
const char * cur_str = str + parsed_len;
- i = std_lite::min(maximum_len - parsed_len, max_double_pinyin_length);
+ i = std_lite::min(maximum_len - parsed_len,
+ (int)max_double_pinyin_length);
+
ChewingKey key; ChewingKeyRest key_rest;
for (; i > 0; --i) {
bool success = parse_one_key(options, key, key_rest, cur_str, i);