Minor optimizations. (#332059, Arnaud Charlet)

2006-02-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c:
	* gtk/gtktextiter.c: Minor optimizations.  (#332059, Arnaud Charlet)
This commit is contained in:
Matthias Clasen 2006-02-22 17:52:29 +00:00 committed by Matthias Clasen
parent cd3d0107c6
commit 6a246a6c96
4 changed files with 10 additions and 10 deletions

View 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)

View 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)

View 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);

View 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)
{