]> Pileus Git - ~andy/gtk/commitdiff
Minor optimizations. (#332059, Arnaud Charlet)
authorMatthias Clasen <mclasen@redhat.com>
Wed, 22 Feb 2006 17:52:29 +0000 (17:52 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 22 Feb 2006 17:52:29 +0000 (17:52 +0000)
2006-02-22  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtktextbtree.c:
* gtk/gtktextiter.c: Minor optimizations.  (#332059, Arnaud Charlet)

ChangeLog
ChangeLog.pre-2-10
gtk/gtktextbtree.c
gtk/gtktextiter.c

index 6c5fc57ad33642731a2ea6b6abd7738aa51d3491..cf59788b8d71c8d8881556c2a2270e1a1d6bab89 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-02-22  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktextbtree.c: 
+       * gtk/gtktextiter.c: Minor optimizations.  (#332059, Arnaud Charlet)
+
        * gtk/gtkradiobutton.c (gtk_radio_button_clicked): Emit notify::active
        here, when changing the value of this property.  (#331651)
 
index 6c5fc57ad33642731a2ea6b6abd7738aa51d3491..cf59788b8d71c8d8881556c2a2270e1a1d6bab89 100644 (file)
@@ -1,5 +1,8 @@
 2006-02-22  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktextbtree.c: 
+       * gtk/gtktextiter.c: Minor optimizations.  (#332059, Arnaud Charlet)
+
        * gtk/gtkradiobutton.c (gtk_radio_button_clicked): Emit notify::active
        here, when changing the value of this property.  (#331651)
 
index 7916c88a185dfd0d6c9d37461e7d0946a88c6102..9c3c3390c72e2b8a90b3e4b72e0753c36da0c939 100644 (file)
@@ -2663,8 +2663,7 @@ ensure_not_off_end (GtkTextBTree *tree,
                     GtkTextLineSegment *mark,
                     GtkTextIter *iter)
 {
-  if (gtk_text_iter_get_line (iter) ==
-      _gtk_text_btree_line_count (tree))
+  if (gtk_text_iter_get_line (iter) == _gtk_text_btree_line_count (tree))
     gtk_text_iter_backward_char (iter);
 }
 
@@ -3343,13 +3342,8 @@ ensure_end_iter_line (GtkTextBTree *tree)
 {
   if (tree->end_iter_line_stamp != tree->chars_changed_stamp)
     {
-      int n_lines;
-      int real_line;
-
-      /* n_lines is without the magic line at the end */
-      n_lines = _gtk_text_btree_line_count (tree);
-      g_assert (n_lines >= 1);
+       /* n_lines is without the magic line at the end */
+      g_assert (_gtk_text_btree_line_count (tree) >= 1);
 
       tree->end_iter_line = _gtk_text_btree_get_line_no_last (tree, -1, &real_line);
       
index 31e3d6b84c2a268fbff4de0c3d2af5b9961e4e28..a757ad3c67e7818aa0712880c4de6b63e954d47e 100644 (file)
@@ -387,7 +387,7 @@ is_segment_start (GtkTextRealIter *real)
   return real->segment_byte_offset == 0 || real->segment_char_offset == 0;
 }
 
-#if 1
+#ifdef G_ENABLE_DEBUG
 static void
 check_invariants (const GtkTextIter *iter)
 {