diff options
author | Peng Wu <alexepico@gmail.com> | 2016-03-09 16:14:02 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-03-09 16:14:02 +0800 |
commit | 68a2f07e7ba7a7458f806662225df5440741955b (patch) | |
tree | ec13bb4113ba0f5f7dcad9012d97d5ea569f8b18 /src/storage/chewing_large_table2_bdb.cpp | |
parent | a6c8ddff4742406fb1af2aea237c537024464682 (diff) | |
download | libpinyin-68a2f07e7ba7a7458f806662225df5440741955b.tar.gz libpinyin-68a2f07e7ba7a7458f806662225df5440741955b.tar.xz libpinyin-68a2f07e7ba7a7458f806662225df5440741955b.zip |
add assert
Diffstat (limited to 'src/storage/chewing_large_table2_bdb.cpp')
-rw-r--r-- | src/storage/chewing_large_table2_bdb.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/storage/chewing_large_table2_bdb.cpp b/src/storage/chewing_large_table2_bdb.cpp index ecec684..8ed80f8 100644 --- a/src/storage/chewing_large_table2_bdb.cpp +++ b/src/storage/chewing_large_table2_bdb.cpp @@ -417,12 +417,14 @@ int ChewingLargeTable2::add_index(int phrase_length, /* for in-complete chewing index */ compute_incomplete_chewing_index(keys, index, phrase_length); result = add_index_internal(phrase_length, index, keys, token); + assert(ERROR_OK == result || ERROR_INSERT_ITEM_EXISTS == result); if (ERROR_OK != result) return result; /* for chewing index */ compute_chewing_index(keys, index, phrase_length); result = add_index_internal(phrase_length, index, keys, token); + assert(ERROR_OK == result || ERROR_INSERT_ITEM_EXISTS == result); return result; } |