diff options
author | Peng Wu <alexepico@gmail.com> | 2022-05-27 11:04:15 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2022-05-27 11:04:15 +0800 |
commit | 80e41bf5ab8158af0799e9f3c97dfc58c39905b4 (patch) | |
tree | bf5dc4ff60f0fdb61df55b4021fea41a313b2b7f | |
parent | 4c3658672351744e38129fe83fe16dc7d48618e9 (diff) | |
download | ibus-libzhuyin-80e41bf5ab8158af0799e9f3c97dfc58c39905b4.tar.gz ibus-libzhuyin-80e41bf5ab8158af0799e9f3c97dfc58c39905b4.tar.xz ibus-libzhuyin-80e41bf5ab8158af0799e9f3c97dfc58c39905b4.zip |
Use check_result macro
-rw-r--r-- | src/ZYEnhancedText.cc | 4 | ||||
-rw-r--r-- | src/ZYZBopomofoSymbolSection.cc | 2 | ||||
-rw-r--r-- | src/ZYZEnhancedEditor.cc | 2 | ||||
-rw-r--r-- | src/ZYZPhoneticEditor.cc | 6 | ||||
-rw-r--r-- | src/ZYZZhuyinEditor.cc | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/src/ZYEnhancedText.cc b/src/ZYEnhancedText.cc index c9cb6fb..8cb7f95 100644 --- a/src/ZYEnhancedText.cc +++ b/src/ZYEnhancedText.cc @@ -337,8 +337,8 @@ erase_input_sequence(String & enhanced_text, size_t offset, size_t length) case SYMBOL_SECTION: { String type, lookup, choice; - assert (get_symbol_section (enhanced_text, pos, end_pos, - type, lookup, choice)); + get_symbol_section (enhanced_text, pos, end_pos, + type, lookup, choice); } break; } diff --git a/src/ZYZBopomofoSymbolSection.cc b/src/ZYZBopomofoSymbolSection.cc index 1628973..f714dfc 100644 --- a/src/ZYZBopomofoSymbolSection.cc +++ b/src/ZYZBopomofoSymbolSection.cc @@ -49,7 +49,7 @@ BopomofoSymbolSection::initCandidates (zhuyin_instance_t * instance, /* cache the choices. */ gchar ** symbols = NULL; - assert (zhuyin_in_chewing_keyboard (instance, key, &symbols)); + check_result (zhuyin_in_chewing_keyboard (instance, key, &symbols)); size_t num = g_strv_length (symbols); assert (num > 0); for (size_t i = 0; i < num; ++i) { diff --git a/src/ZYZEnhancedEditor.cc b/src/ZYZEnhancedEditor.cc index 524c6a0..e6809d7 100644 --- a/src/ZYZEnhancedEditor.cc +++ b/src/ZYZEnhancedEditor.cc @@ -50,7 +50,7 @@ EnhancedEditor::processKeyEvent (guint keyval, guint keycode, guint modifiers) #if 0 if (isPhonetic (keyval)) { /* zhuyin or pinyin key */ - assert (insert_phonetic (m_text, m_cursor++, keyval)); + check_result (insert_phonetic (m_text, m_cursor++, keyval)); update (); return TRUE; } else { diff --git a/src/ZYZPhoneticEditor.cc b/src/ZYZPhoneticEditor.cc index 4a15f36..93bb4c2 100644 --- a/src/ZYZPhoneticEditor.cc +++ b/src/ZYZPhoneticEditor.cc @@ -155,7 +155,7 @@ PhoneticEditor::processSpace (guint keyval, guint keycode, assert (is_special_symbol (' ')); if (m_props.modeFullWidth ()) { String symbol; - convert_special_symbol (keyval, symbol); + check_result (convert_special_symbol (keyval, symbol)); commit (symbol); } else { String symbol = ' '; @@ -961,7 +961,7 @@ PhoneticEditor::insertSymbol (guint keyval, guint keycode, guint modifiers) (keyval == IBUS_bracketleft || keyval == IBUS_bracketright || keyval == IBUS_apostrophe)) - assert (convert_special_symbol (keyval, choice)); + check_result (convert_special_symbol (keyval, choice)); String lookup; int ch = find_lookup_key (choice); @@ -976,7 +976,7 @@ PhoneticEditor::insertSymbol (guint keyval, guint keycode, guint modifiers) if (m_props.modeFullWidth () || (modifiers & IBUS_SHIFT_MASK)) { String choice; - assert (convert_full_width_symbol (keyval, choice)); + check_result (convert_full_width_symbol (keyval, choice)); String lookup; int ch = find_lookup_key (choice); diff --git a/src/ZYZZhuyinEditor.cc b/src/ZYZZhuyinEditor.cc index ea75809..7a1e680 100644 --- a/src/ZYZZhuyinEditor.cc +++ b/src/ZYZZhuyinEditor.cc @@ -154,7 +154,7 @@ ZhuyinEditor::updatePreeditText (void) char sym = section[i]; gchar ** symbols = NULL; /* append bopomofo symbol except for DaChen26. */ - assert (zhuyin_in_chewing_keyboard (m_instance, sym, &symbols)); + check_result (zhuyin_in_chewing_keyboard (m_instance, sym, &symbols)); assert (NULL != symbols[0]); m_preedit_text += symbols[0]; g_strfreev (symbols); |