[gspell/wip/improve-perfs: 1/2] InlineCheckerTextBuffer: remove g_asserts in adjust_iters()



commit f4a9e0273ef4e02f6b25673a8c2ff843f39584dc
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Apr 1 19:06:35 2017 +0200

    InlineCheckerTextBuffer: remove g_asserts in adjust_iters()
    
    The _gspell_text_iter functions are really slow, so it's better to avoid
    them if possible. Here they are not very useful.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776811

 gspell/gspell-inline-checker-text-buffer.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/gspell/gspell-inline-checker-text-buffer.c b/gspell/gspell-inline-checker-text-buffer.c
index 0506e04..4dd1359 100644
--- a/gspell/gspell-inline-checker-text-buffer.c
+++ b/gspell/gspell-inline-checker-text-buffer.c
@@ -177,14 +177,12 @@ adjust_iters (GtkTextIter *start,
                            !_gspell_text_iter_starts_word (start))
                        {
                                _gspell_text_iter_backward_word_start (start);
-                               g_assert (_gspell_text_iter_starts_word (start));
                        }
 
                        if (_gspell_text_iter_inside_word (end) &&
                            !_gspell_text_iter_starts_word (end))
                        {
                                _gspell_text_iter_forward_word_end (end);
-                               g_assert (_gspell_text_iter_ends_word (end));
                        }
                        break;
 
@@ -194,13 +192,11 @@ adjust_iters (GtkTextIter *start,
                             !_gspell_text_iter_starts_word (start)))
                        {
                                _gspell_text_iter_backward_word_start (start);
-                               g_assert (_gspell_text_iter_starts_word (start));
                        }
 
                        if (_gspell_text_iter_inside_word (end))
                        {
                                _gspell_text_iter_forward_word_end (end);
-                               g_assert (_gspell_text_iter_ends_word (end));
                        }
                        break;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]