diff options
| author | Peng Wu <alexepico@gmail.com> | 2016-06-03 11:27:06 +0800 |
|---|---|---|
| committer | Peng Wu <alexepico@gmail.com> | 2016-06-03 11:27:06 +0800 |
| commit | cee5f04690465d99b05313add946beceed2a31f2 (patch) | |
| tree | 5420d962975139a668c66948539c9d986c6e2fc3 /src/storage/pinyin_parser2.cpp | |
| parent | 1c5bd353c29a3105c63c1f397b819a3b7135db99 (diff) | |
| download | libpinyin-cee5f04690465d99b05313add946beceed2a31f2.tar.gz libpinyin-cee5f04690465d99b05313add946beceed2a31f2.tar.xz libpinyin-cee5f04690465d99b05313add946beceed2a31f2.zip | |
update *_step functions
Diffstat (limited to 'src/storage/pinyin_parser2.cpp')
| -rw-r--r-- | src/storage/pinyin_parser2.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index e9b7051..b96f6d8 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -886,6 +886,9 @@ int PinyinDirectParser2::parse(pinyin_option_t options, /* need to use the pinyin_parser_table header. */ bool resplit_step(pinyin_option_t options, PhoneticKeyMatrix * matrix) { + if (!(options & USE_RESPLIT_TABLE)) + return false; + size_t length = matrix->size(); GArray * keys = g_array_new(TRUE, TRUE, sizeof(ChewingKey)); @@ -965,6 +968,9 @@ bool resplit_step(pinyin_option_t options, /* need to use the pinyin_parser_table header. */ bool inner_split_step(pinyin_option_t options, PhoneticKeyMatrix * matrix) { + if (!(options & USE_DIVIDED_TABLE)) + return false; + size_t length = matrix->size(); GArray * keys = g_array_new(TRUE, TRUE, sizeof(ChewingKey)); |
