summaryrefslogtreecommitdiffstats
path: root/src/storage/pinyin_parser2.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-11-22 17:34:54 +0800
committerPeng Wu <alexepico@gmail.com>2011-11-22 17:34:54 +0800
commit5431afcc6ae10297314bfa6a685a5d9cbe9cb7ff (patch)
tree3264fd574c545508b3a185785d47b052a712ea42 /src/storage/pinyin_parser2.cpp
parentb8f24229c7b6ca730fdd93e48e6e047f3151de4a (diff)
downloadlibpinyin-5431afcc6ae10297314bfa6a685a5d9cbe9cb7ff.tar.gz
libpinyin-5431afcc6ae10297314bfa6a685a5d9cbe9cb7ff.tar.xz
libpinyin-5431afcc6ae10297314bfa6a685a5d9cbe9cb7ff.zip
fixes compile warnings
Diffstat (limited to 'src/storage/pinyin_parser2.cpp')
-rw-r--r--src/storage/pinyin_parser2.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp
index 90f74cf..d92ceaa 100644
--- a/src/storage/pinyin_parser2.cpp
+++ b/src/storage/pinyin_parser2.cpp
@@ -200,20 +200,20 @@ bool FullPinyinParser2::parse_one_key (guint32 options, ChewingKey & key,
int FullPinyinParser2::parse (guint32 options, ChewingKeyVector & keys,
ChewingKeyRestVector & key_rests,
const char *str, int len) const {
- size_t i;
+ int i;
/* clear arrays. */
g_array_set_size(keys, 0);
g_array_set_size(key_rests, 0);
/* init m_parse_steps, and prepare dynamic programming. */
- size_t step_len = len + 1;
+ int step_len = len + 1;
g_array_set_size(m_parse_steps, 0);
parse_value_t value;
for (i = 0; i < step_len; ++i) {
g_array_append_val(m_parse_steps, value);
}
- size_t str_len = len; size_t next_sep = 0;
+ size_t next_sep = 0;
gchar * input = g_strndup(str, len);
parse_value_t * curstep = NULL, * nextstep = NULL;
@@ -234,7 +234,7 @@ int FullPinyinParser2::parse (guint32 options, ChewingKeyVector & keys,
/* forward to next "'" */
if ( 0 == next_sep ) {
- size_t k;
+ int k;
for (k = i; k < len; ++k) {
if (input[k] == '\'')
break;
@@ -293,7 +293,7 @@ int FullPinyinParser2::parse (guint32 options, ChewingKeyVector & keys,
int FullPinyinParser2::final_step(size_t step_len, ChewingKeyVector & keys,
ChewingKeyRestVector & key_rests) const{
- size_t i;
+ int i;
gint16 parsed_len = 0;
parse_value_t * curstep = NULL;
@@ -332,7 +332,7 @@ int FullPinyinParser2::final_step(size_t step_len, ChewingKeyVector & keys,
bool FullPinyinParser2::post_process(guint32 options,
ChewingKeyVector & keys,
ChewingKeyRestVector & key_rests) const {
- size_t i;
+ int i;
assert(keys->len == key_rests->len);
gint16 num_keys = keys->len;