summaryrefslogtreecommitdiffstats
path: root/src/storage/pinyin_parser2.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-11-17 18:42:30 +0800
committerPeng Wu <alexepico@gmail.com>2011-11-17 18:42:30 +0800
commitaba60da76a2d105b57512bcd24df5cd8f09abf63 (patch)
tree6632ed612987dbf09f9febb3b2bcc97859a5a752 /src/storage/pinyin_parser2.cpp
parentf22c9f45a7b9a9be6db89414618d4d2151af8ee6 (diff)
downloadlibpinyin-aba60da76a2d105b57512bcd24df5cd8f09abf63.tar.gz
libpinyin-aba60da76a2d105b57512bcd24df5cd8f09abf63.tar.xz
libpinyin-aba60da76a2d105b57512bcd24df5cd8f09abf63.zip
fixes post process in full pinyin parser2
Diffstat (limited to 'src/storage/pinyin_parser2.cpp')
-rw-r--r--src/storage/pinyin_parser2.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp
index c2f3d39..82141d4 100644
--- a/src/storage/pinyin_parser2.cpp
+++ b/src/storage/pinyin_parser2.cpp
@@ -360,6 +360,8 @@ bool FullPinyinParser2::post_process(guint32 options,
break;
}
+
+ /* find the match */
if (k < G_N_ELEMENTS(resplit_table)) {
/* do re-split */
item = resplit_table + k;
@@ -368,11 +370,12 @@ bool FullPinyinParser2::post_process(guint32 options,
/* assumes only moved one char in gen_all_resplit script. */
cur_rest->m_raw_end --;
next_rest->m_raw_begin --;
- /* save back tones */
- if (options & USE_TONE) {
- cur_key->m_tone = cur_tone;
- next_key->m_tone = next_tone;
- }
+ }
+
+ /* save back tones */
+ if (options & USE_TONE) {
+ cur_key->m_tone = cur_tone;
+ next_key->m_tone = next_tone;
}
}