summaryrefslogtreecommitdiffstats
path: root/src/storage/phrase_large_table2.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2022-06-06 17:32:00 +0800
committerPeng Wu <alexepico@gmail.com>2022-06-06 17:32:00 +0800
commit2323c59d337ca56c585a8b58b855e84938ecfc27 (patch)
treedc32a1af5a593170bd6149d361521832f1885ca5 /src/storage/phrase_large_table2.cpp
parent5f3df104b5ac0c3497a48cfc476eb3eedf1e543b (diff)
downloadlibpinyin-2323c59d337ca56c585a8b58b855e84938ecfc27.tar.gz
libpinyin-2323c59d337ca56c585a8b58b855e84938ecfc27.tar.xz
libpinyin-2323c59d337ca56c585a8b58b855e84938ecfc27.zip
Use abort function instead of assert macro
Diffstat (limited to 'src/storage/phrase_large_table2.cpp')
-rw-r--r--src/storage/phrase_large_table2.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/storage/phrase_large_table2.cpp b/src/storage/phrase_large_table2.cpp
index 0e6fa62..b72917c 100644
--- a/src/storage/phrase_large_table2.cpp
+++ b/src/storage/phrase_large_table2.cpp
@@ -184,7 +184,7 @@ PhraseLengthIndexLevel2::~PhraseLengthIndexLevel2(){
CASE(15);
CASE(16);
default:
- assert(false);
+ abort();
}
}
g_array_free(m_phrase_array_indexes, TRUE);
@@ -228,7 +228,7 @@ int PhraseLengthIndexLevel2::search(int phrase_length,
CASE(15);
CASE(16);
default:
- assert(false);
+ abort();
}
#undef CASE
}
@@ -348,7 +348,7 @@ int PhraseLengthIndexLevel2::add_index(int phrase_length,
CASE(15);
CASE(16);
default:
- assert(false);
+ abort();
}
#undef CASE
@@ -402,7 +402,7 @@ int PhraseLengthIndexLevel2::remove_index(int phrase_length,
CASE(15);
CASE(16);
default:
- assert(false);
+ abort();
}
#undef CASE
}
@@ -605,7 +605,7 @@ bool PhraseLengthIndexLevel2::load(MemoryChunk * chunk,
CASE(15);
CASE(16);
default:
- assert(false);
+ abort();
}
#undef CASE
}
@@ -661,7 +661,7 @@ bool PhraseLengthIndexLevel2::store(MemoryChunk * new_chunk,
CASE(15);
CASE(16);
default:
- assert(false);
+ abort();
}
//add '#'
new_chunk->set_content(offset, &c_separate, sizeof(char));
@@ -781,7 +781,7 @@ bool PhraseLengthIndexLevel2::mask_out(phrase_token_t mask,
CASE(15);
CASE(16);
default:
- assert(false);
+ abort();
}
}
/* shrink self array. */