diff options
author | Peng Wu <alexepico@gmail.com> | 2016-03-09 12:03:08 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-03-09 12:03:08 +0800 |
commit | 850e3d51ae96b2f626f5c88c164d6860279b2584 (patch) | |
tree | 7ccfbe045999904d37faeb4b5a4e4ed3d9af3095 /src/storage/chewing_large_table2_bdb.cpp | |
parent | be2dafb5c4aa1deca6746134beebc420bf0e424e (diff) | |
download | libpinyin-850e3d51ae96b2f626f5c88c164d6860279b2584.tar.gz libpinyin-850e3d51ae96b2f626f5c88c164d6860279b2584.tar.xz libpinyin-850e3d51ae96b2f626f5c88c164d6860279b2584.zip |
fixes typos
Diffstat (limited to 'src/storage/chewing_large_table2_bdb.cpp')
-rw-r--r-- | src/storage/chewing_large_table2_bdb.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/storage/chewing_large_table2_bdb.cpp b/src/storage/chewing_large_table2_bdb.cpp index f0d2e0f..cd31a45 100644 --- a/src/storage/chewing_large_table2_bdb.cpp +++ b/src/storage/chewing_large_table2_bdb.cpp @@ -221,9 +221,6 @@ int ChewingLargeTable2::search_internal(/* in */ const ChewingKey index[], /* out */ PhraseIndexRanges ranges) const { int result = SEARCH_NONE; - if (NULL == m_db) - return result; - ChewingTableEntry<phrase_length> * entry = (ChewingTableEntry<phrase_length> *) g_ptr_array_index(m_entries, phrase_length); @@ -291,6 +288,9 @@ int ChewingLargeTable2::search(int phrase_length, /* out */ PhraseIndexRanges ranges) const { ChewingKey index[MAX_PHRASE_LENGTH]; + if (NULL == m_db) + return SEARCH_NONE; + if (contains_incomplete_pinyin(keys, phrase_length)) { compute_incomplete_chewing_index(keys, index, phrase_length); return search_internal(phrase_length, index, keys, ranges); |