From 5c89ad8b701188916847acf54e9efc025f9002bb Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 14 Dec 2011 14:34:40 +0800 Subject: remove table index in chewing key rest --- src/storage/chewing_key.h | 6 +----- src/storage/pinyin_parser2.cpp | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/storage/chewing_key.h b/src/storage/chewing_key.h index 68733d4..3f1d1db 100644 --- a/src/storage/chewing_key.h +++ b/src/storage/chewing_key.h @@ -197,18 +197,14 @@ static inline bool operator == (ChewingKey lhs, ChewingKey rhs) { struct ChewingKeyRest { - /* Note: the table index is deprecated, - * and will be removed in the next major release. - * Currently this is kept for debugging purpose. + /* Note: the table index is removed, * Please use get_table_index in ChewingKey. */ - guint16 m_table_index; /* the index in pinyin parser table. */ guint16 m_raw_begin; /* the begin of the raw input. */ guint16 m_raw_end; /* the end of the raw input. */ ChewingKeyRest() { /* the 0th item in pinyin parser table is reserved for invalid. */ - m_table_index = 0; m_raw_begin = 0; m_raw_end = 0; } diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index d8cfaa6..a762909 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -416,7 +416,7 @@ int FullPinyinParser2::final_step(size_t step_len, ChewingKeyVector & keys, gint16 pos = curstep->m_num_keys - 1; /* skip "'" */ - if (0 != curstep->m_key_rest.m_table_index) { + if (0 != curstep->m_key.get_table_index()) { ChewingKey * key = &g_array_index(keys, ChewingKey, pos); ChewingKeyRest * rest = &g_array_index (key_rests, ChewingKeyRest, pos); -- cgit