diff options
author | Peng Wu <alexepico@gmail.com> | 2011-09-14 12:39:47 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-09-14 12:39:47 +0800 |
commit | 8076a7b21cc02123e2452e05afd68773dd918a8b (patch) | |
tree | 9aa5ac71c818e2b4780035129506e623b5ea3ea6 /src/storage/pinyin_phrase.h | |
parent | 0cf6dd37e1dbd21195e78756aa90b36e59914f71 (diff) | |
download | libpinyin-8076a7b21cc02123e2452e05afd68773dd918a8b.tar.gz libpinyin-8076a7b21cc02123e2452e05afd68773dd918a8b.tar.xz libpinyin-8076a7b21cc02123e2452e05afd68773dd918a8b.zip |
update pinyin phrase
Diffstat (limited to 'src/storage/pinyin_phrase.h')
-rw-r--r-- | src/storage/pinyin_phrase.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/storage/pinyin_phrase.h b/src/storage/pinyin_phrase.h index 0c7bbc5..61c0c6e 100644 --- a/src/storage/pinyin_phrase.h +++ b/src/storage/pinyin_phrase.h @@ -98,9 +98,8 @@ inline void compute_lower_value(const PinyinCustomSettings &custom, //deal with initial sel = aKey.m_initial; for( k = aKey.m_initial - 1; k >= PINYIN_ZeroInitial; k--){ - if ( 0 != pinyin_compare_initial(custom, - (PinyinInitial)k, - (PinyinInitial)aKey.m_initial) ) + if ( 0 != pinyin_compare_initial + (custom, (PinyinInitial)aKey.m_initial, (PinyinInitial)k) ) break; else sel = k; @@ -109,9 +108,8 @@ inline void compute_lower_value(const PinyinCustomSettings &custom, //deal with final sel = aKey.m_final; for( k = aKey.m_final - 1; k >= PINYIN_ZeroFinal; k--){ - if ( 0 != pinyin_compare_final(custom, - (PinyinFinal)k, - (PinyinFinal)aKey.m_final) ) + if ( 0 != pinyin_compare_final + (custom, (PinyinFinal)aKey.m_final, (PinyinFinal)k) ) break; else sel = k; @@ -120,9 +118,8 @@ inline void compute_lower_value(const PinyinCustomSettings &custom, //deal with tone sel = aKey.m_tone; for( k = aKey.m_tone - 1; k >= PINYIN_ZeroTone; k--){ - if ( 0 != pinyin_compare_tone(custom, - (PinyinTone)k, - (PinyinTone)aKey.m_tone) ) + if ( 0 != pinyin_compare_tone + (custom, (PinyinTone)aKey.m_tone, (PinyinTone)k) ) break; else sel = k; @@ -147,7 +144,8 @@ inline void compute_upper_value(const PinyinCustomSettings &custom, //deal with initial sel = aKey.m_initial; for( k = aKey.m_initial + 1; k <= PINYIN_LastInitial; k++){ - if ( 0 != pinyin_compare_initial(custom, (PinyinInitial)k, (PinyinInitial)aKey.m_initial) ) + if ( 0 != pinyin_compare_initial + (custom, (PinyinInitial)aKey.m_initial, (PinyinInitial)k) ) break; else sel = k; @@ -156,7 +154,8 @@ inline void compute_upper_value(const PinyinCustomSettings &custom, //deal with final sel = aKey.m_final; for( k = aKey.m_final + 1; k <= PINYIN_LastFinal; k++){ - if ( 0 != pinyin_compare_final(custom, (PinyinFinal)k, (PinyinFinal)aKey.m_final) ) + if ( 0 != pinyin_compare_final + (custom, (PinyinFinal)aKey.m_final, (PinyinFinal)k) ) break; else sel = k; @@ -165,7 +164,8 @@ inline void compute_upper_value(const PinyinCustomSettings &custom, //deal with tone sel = aKey.m_tone; for( k = aKey.m_tone + 1; k <= PINYIN_LastTone; k++){ - if ( 0 != pinyin_compare_tone(custom, (PinyinTone)k, (PinyinTone)aKey.m_tone) ) + if ( 0 != pinyin_compare_tone + (custom, (PinyinTone)aKey.m_tone, (PinyinTone)k) ) break; else sel = k; |