summaryrefslogtreecommitdiffstats
path: root/src/storage/table_info.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/table_info.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/table_info.cpp')
-rw-r--r--src/storage/table_info.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/storage/table_info.cpp b/src/storage/table_info.cpp
index 44fcf60..41c7da0 100644
--- a/src/storage/table_info.cpp
+++ b/src/storage/table_info.cpp
@@ -113,7 +113,7 @@ static TABLE_PHONETIC_TYPE to_table_phonetic_type(const char * str) {
if (0 == strcmp("zhuyin", str))
return ZHUYIN_TABLE;
- assert(FALSE);
+ abort();
}
static TABLE_DATABASE_FORMAT_TYPE to_table_database_format_type(const char * str) {
@@ -123,7 +123,7 @@ static TABLE_DATABASE_FORMAT_TYPE to_table_database_format_type(const char * str
if (0 == strcmp("KyotoCabinet", str))
return KYOTO_CABINET_FORMAT;
- assert(FALSE);
+ abort();
}
static TABLE_TARGET to_table_target(const char * str) {
@@ -133,7 +133,7 @@ static TABLE_TARGET to_table_target(const char * str) {
if (0 == strcmp("addon", str))
return ADDON_TABLE;
- assert(FALSE);
+ abort();
}
static guint8 to_index_of_default_tables(const char * str) {
@@ -147,7 +147,7 @@ static guint8 to_index_of_default_tables(const char * str) {
HANDLE(NETWORK_DICTIONARY);
HANDLE(USER_DICTIONARY);
- assert(FALSE);
+ abort();
}
static guint8 to_index_of_addon_tables(const char * str) {
@@ -166,7 +166,7 @@ static PHRASE_FILE_TYPE to_file_type(const char * str) {
HANDLE(DICTIONARY);
HANDLE(USER_FILE);
- assert(FALSE);
+ abort();
}
#undef HANDLE
@@ -178,7 +178,7 @@ static const char * from_table_database_format_type(const TABLE_DATABASE_FORMAT_
if (format == KYOTO_CABINET_FORMAT)
return "KyotoCabinet";
- assert(FALSE);
+ abort();
}