summaryrefslogtreecommitdiffstats
path: root/src/storage/ngram_bdb.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2022-06-01 11:47:23 +0800
committerPeng Wu <alexepico@gmail.com>2022-06-01 12:06:24 +0800
commit706188e5080f29665ecd41791df611f4e3a6e248 (patch)
tree77cfedb552ddec6fbbee079ef324e592e60a8ce1 /src/storage/ngram_bdb.cpp
parenteea629ed12aa44600e681427f543ef181a4653d0 (diff)
downloadlibpinyin-706188e5080f29665ecd41791df611f4e3a6e248.tar.gz
libpinyin-706188e5080f29665ecd41791df611f4e3a6e248.tar.xz
libpinyin-706188e5080f29665ecd41791df611f4e3a6e248.zip
Use check_result macro in src directory
Diffstat (limited to 'src/storage/ngram_bdb.cpp')
-rw-r--r--src/storage/ngram_bdb.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/storage/ngram_bdb.cpp b/src/storage/ngram_bdb.cpp
index 95afdbd..8910f9d 100644
--- a/src/storage/ngram_bdb.cpp
+++ b/src/storage/ngram_bdb.cpp
@@ -227,12 +227,12 @@ bool Bigram::mask_out(phrase_token_t mask, phrase_token_t value){
phrase_token_t index = g_array_index(items, phrase_token_t, i);
if ((index & mask) == value) {
- assert(remove(index));
+ check_result(remove(index));
continue;
}
SingleGram * gram = NULL;
- assert(load(index, gram));
+ check_result(load(index, gram));
int num = gram->mask_out(mask, value);
if (0 == num) {
@@ -241,9 +241,9 @@ bool Bigram::mask_out(phrase_token_t mask, phrase_token_t value){
}
if (0 == gram->get_length()) {
- assert(remove(index));
+ check_result(remove(index));
} else {
- assert(store(index, gram));
+ check_result(store(index, gram));
}
delete gram;