summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-07-21 16:16:01 +0800
committerPeng Wu <alexepico@gmail.com>2016-07-21 16:16:01 +0800
commitb2819139121d302ea1c86eac1c5dbc22f1f70b22 (patch)
tree34f29d157c586f4048c7a838f18387bbe0c96a30 /src
parent4b4d5d200bf6ab4287ad1ab1c98a986abc11b19c (diff)
downloadibus-libpinyin-b2819139121d302ea1c86eac1c5dbc22f1f70b22.tar.gz
ibus-libpinyin-b2819139121d302ea1c86eac1c5dbc22f1f70b22.tar.xz
ibus-libpinyin-b2819139121d302ea1c86eac1c5dbc22f1f70b22.zip
use g_assert instead of assert
Diffstat (limited to 'src')
-rw-r--r--src/PYLibPinyin.cc3
-rw-r--r--src/PYPBopomofoEditor.cc5
-rw-r--r--src/PYPPinyinEditor.cc3
3 files changed, 4 insertions, 7 deletions
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 <assert.h>
#include <string.h>
#include <pinyin.h>
#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 <assert.h>
#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 <assert.h>
#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)