summaryrefslogtreecommitdiffstats
path: root/src/storage/phrase_index.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-05-27 13:38:26 +0800
committerPeng Wu <alexepico@gmail.com>2016-05-27 13:38:26 +0800
commit5df16470a5ab0968d482481c42cf255bf222ecee (patch)
treeca89b5f7bbf37648a222cf6b1f250011dc6eddad /src/storage/phrase_index.cpp
parent9e098143481cb701af79f31902b200ca548ae27c (diff)
downloadlibpinyin-5df16470a5ab0968d482481c42cf255bf222ecee.tar.gz
libpinyin-5df16470a5ab0968d482481c42cf255bf222ecee.tar.xz
libpinyin-5df16470a5ab0968d482481c42cf255bf222ecee.zip
update class PhraseItem
Diffstat (limited to 'src/storage/phrase_index.cpp')
-rw-r--r--src/storage/phrase_index.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/storage/phrase_index.cpp b/src/storage/phrase_index.cpp
index a18ff9d..1e91b83 100644
--- a/src/storage/phrase_index.cpp
+++ b/src/storage/phrase_index.cpp
@@ -107,8 +107,7 @@ bool PhraseItem::set_phrase_string(guint8 phrase_length, ucs4_t * phrase){
return true;
}
-void PhraseItem::increase_pronunciation_possibility(pinyin_option_t options,
- ChewingKey * keys,
+void PhraseItem::increase_pronunciation_possibility(ChewingKey * keys,
gint32 delta){
guint8 phrase_length = get_phrase_length();
guint8 npron = get_n_pronunciation();
@@ -123,9 +122,8 @@ void PhraseItem::increase_pronunciation_possibility(pinyin_option_t options,
phrase_length * sizeof(ChewingKey));
total_freq += *freq;
- if (0 == pinyin_compare_with_ambiguities2
- (options, keys,
- (ChewingKey *)chewing_begin, phrase_length)) {
+ if (0 == pinyin_compare_with_tones(keys, (ChewingKey *)chewing_begin,
+ phrase_length)) {
/* protect against total_freq overflow. */
if (delta > 0 && total_freq > total_freq + delta)