From b2819139121d302ea1c86eac1c5dbc22f1f70b22 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 21 Jul 2016 16:16:01 +0800 Subject: use g_assert instead of assert --- src/PYLibPinyin.cc | 3 +-- src/PYPBopomofoEditor.cc | 5 ++--- src/PYPPinyinEditor.cc | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/PYLibPinyin.cc b/src/PYLibPinyin.cc index 0739bea..179a454 100644 --- a/src/PYLibPinyin.cc +++ b/src/PYLibPinyin.cc @@ -21,7 +21,6 @@ #include "PYLibPinyin.h" -#include #include #include #include "PYPConfig.h" @@ -316,7 +315,7 @@ LibPinyinBackEnd::rememberUserInput (pinyin_instance_t * instance) remember user input. */ gchar * sentence = NULL; pinyin_get_sentence (instance, &sentence); - assert (pinyin_remember_user_input (instance, sentence, -1)); + pinyin_remember_user_input (instance, sentence, -1); g_free (sentence); /* save later, will mark modified from pinyin/bopomofo editor. */ diff --git a/src/PYPBopomofoEditor.cc b/src/PYPBopomofoEditor.cc index a18e9ef..a48a856 100644 --- a/src/PYPBopomofoEditor.cc +++ b/src/PYPBopomofoEditor.cc @@ -20,7 +20,6 @@ */ #include "PYPBopomofoEditor.h" -#include #include "PYConfig.h" #include "PYLibPinyin.h" #include "PYPinyinProperties.h" @@ -279,7 +278,7 @@ BopomofoEditor::commit () while (*p != '\0') { gchar ** symbols = NULL; if (pinyin_in_chewing_keyboard (m_instance, *p, &symbols)) { - assert (1 == g_strv_length (symbols)); + g_assert (1 == g_strv_length (symbols)); m_buffer << symbols[0]; g_strfreev (symbols); } else { @@ -330,7 +329,7 @@ BopomofoEditor::updatePreeditText () size_t offset = 0; guint cursor = getPinyinCursor (); - assert (pinyin_get_character_offset(m_instance, sentence, cursor, &offset)); + g_assert (pinyin_get_character_offset(m_instance, sentence, cursor, &offset)); Editor::updatePreeditText (preedit_text, offset, TRUE); if (sentence) diff --git a/src/PYPPinyinEditor.cc b/src/PYPPinyinEditor.cc index 18c7f20..4ed475f 100644 --- a/src/PYPPinyinEditor.cc +++ b/src/PYPPinyinEditor.cc @@ -20,7 +20,6 @@ */ #include "PYPPinyinEditor.h" -#include #include "PYConfig.h" #include "PYPinyinProperties.h" #include "PYSimpTradConverter.h" @@ -267,7 +266,7 @@ PinyinEditor::updatePreeditText () size_t offset = 0; guint cursor = getPinyinCursor (); - assert (pinyin_get_character_offset(m_instance, sentence, cursor, &offset)); + g_assert (pinyin_get_character_offset(m_instance, sentence, cursor, &offset)); Editor::updatePreeditText (preedit_text, offset, TRUE); if (sentence) -- cgit