diff options
author | Peng Wu <alexepico@gmail.com> | 2013-04-18 11:26:23 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2013-04-18 11:26:23 +0800 |
commit | cb827e2511b9557e41acec74a3d6ebcfaed862f8 (patch) | |
tree | 1da7c29c8bef4d3f231b5e996fb967678be25fd8 /src/storage/pinyin_phrase2.h | |
parent | 0ee1b6a1b63ae2d55684bd982a95a6a9389f12d2 (diff) | |
download | libpinyin-cb827e2511b9557e41acec74a3d6ebcfaed862f8.tar.gz libpinyin-cb827e2511b9557e41acec74a3d6ebcfaed862f8.tar.xz libpinyin-cb827e2511b9557e41acec74a3d6ebcfaed862f8.zip |
add const modifiers for chewing table
Diffstat (limited to 'src/storage/pinyin_phrase2.h')
-rw-r--r-- | src/storage/pinyin_phrase2.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/storage/pinyin_phrase2.h b/src/storage/pinyin_phrase2.h index d5042aa..ba2f32e 100644 --- a/src/storage/pinyin_phrase2.h +++ b/src/storage/pinyin_phrase2.h @@ -107,9 +107,9 @@ inline int pinyin_compare_with_ambiguities2(pinyin_option_t options, /* compute pinyin lower bound */ inline void compute_lower_value2(pinyin_option_t options, - ChewingKey * in_keys, - ChewingKey * out_keys, - int phrase_length) { + const ChewingKey * in_keys, + ChewingKey * out_keys, + int phrase_length) { ChewingKey aKey; for (int i = 0; i < phrase_length; ++i) { @@ -167,7 +167,7 @@ inline void compute_lower_value2(pinyin_option_t options, /* compute pinyin upper bound */ inline void compute_upper_value2(pinyin_option_t options, - ChewingKey * in_keys, + const ChewingKey * in_keys, ChewingKey * out_keys, int phrase_length) { ChewingKey aKey; @@ -237,7 +237,8 @@ struct PinyinIndexItem2{ phrase_token_t m_token; ChewingKey m_keys[phrase_length]; public: - PinyinIndexItem2<phrase_length> (ChewingKey * keys, phrase_token_t token) { + PinyinIndexItem2<phrase_length> (const ChewingKey * keys, + phrase_token_t token) { memmove(m_keys, keys, sizeof(ChewingKey) * phrase_length); m_token = token; } |