diff options
author | Peng Wu <alexepico@gmail.com> | 2012-04-19 14:51:00 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2012-04-19 14:51:00 +0800 |
commit | be2be435b1ad0371603407c567475d1490ade1ed (patch) | |
tree | 1b017623f600ab87363a384e4fb3dc0d1466857b /src/storage | |
parent | fe4688fd9725b295a31c3475c0a117c78de59a0c (diff) | |
download | libpinyin-be2be435b1ad0371603407c567475d1490ade1ed.tar.gz libpinyin-be2be435b1ad0371603407c567475d1490ade1ed.tar.xz libpinyin-be2be435b1ad0371603407c567475d1490ade1ed.zip |
refine retrieve_divided_item
Diffstat (limited to 'src/storage')
-rw-r--r-- | src/storage/pinyin_parser2.cpp | 11 | ||||
-rw-r--r-- | src/storage/pinyin_parser2.h | 3 |
2 files changed, 2 insertions, 12 deletions
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index b4175b1..e9e5347 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -574,17 +574,8 @@ bool FullPinyinParser2::post_process2(pinyin_option_t options, } const divided_table_item_t * FullPinyinParser2::retrieve_divided_item -(pinyin_option_t options, size_t offset, - ChewingKeyVector & keys, ChewingKeyRestVector & key_rests, +(pinyin_option_t options, ChewingKey * key, ChewingKeyRest * rest, const char * str, int len) const { - assert(keys->len == key_rests->len); - - gint num_keys = keys->len; - assert(offset < num_keys); - - ChewingKey * key = &g_array_index(keys, ChewingKey, offset); - ChewingKeyRest * rest = &g_array_index(key_rests, - ChewingKeyRest, offset); guint16 tone = CHEWING_ZERO_TONE; /* lookup divided table */ diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h index 77ed3d4..50bcef0 100644 --- a/src/storage/pinyin_parser2.h +++ b/src/storage/pinyin_parser2.h @@ -153,8 +153,7 @@ protected: public: const divided_table_item_t * retrieve_divided_item - (pinyin_option_t options, size_t offset, - ChewingKeyVector & keys, ChewingKeyRestVector & key_rests, + (pinyin_option_t options, ChewingKey * key, ChewingKeyRest * rest, const char * str, int len) const; public: FullPinyinParser2(); |