summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-07-31 11:32:26 +0800
committerPeng Wu <alexepico@gmail.com>2012-07-31 11:32:26 +0800
commit81b4c63ac28e61e7f655d0ee2d0c589f06805b94 (patch)
tree09c6e0075260506c06a05d6eae02a141cb2e0e84
parent4652b8f99a0c4f50dbcb156b2019c8f0b5183e28 (diff)
downloadlibpinyin-81b4c63ac28e61e7f655d0ee2d0c589f06805b94.tar.gz
libpinyin-81b4c63ac28e61e7f655d0ee2d0c589f06805b94.tar.xz
libpinyin-81b4c63ac28e61e7f655d0ee2d0c589f06805b94.zip
polish code
-rw-r--r--src/pinyin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index 3223152..4c0452d 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -315,13 +315,13 @@ bool pinyin_iterator_add_phrase(import_iterator_t * iter,
if (ERROR_OK == retval) {
token = range.m_range_end;
- if ( 0x00000000 == (token & PHRASE_MASK))
+ if (0x00000000 == (token & PHRASE_MASK))
token++;
/* parse the pinyin. */
parser.parse(options, keys, key_rests, pinyin, strlen(pinyin));
- if ( len_phrase == keys->len ) { /* valid pinyin */
+ if (len_phrase == keys->len) { /* valid pinyin */
phrase_table->add_index(len_phrase, ucs4_phrase, token);
pinyin_table->add_index
(keys->len, (ChewingKey *)(keys->data), token);