diff options
author | Matthias Clasen <mclasen@redhat.com> | 2006-02-22 17:52:29 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-02-22 17:52:29 +0000 |
commit | 6a246a6c96986e5d0d743cbab292e0d99dcdc32c (patch) | |
tree | 76cb4ea93f5e2bf9a535009076d28bdc3f17283f /gtk/gtktextbtree.c | |
parent | cd3d0107c64d58273d0568f95412d43ea8a316f5 (diff) | |
download | gtk+-6a246a6c96986e5d0d743cbab292e0d99dcdc32c.tar.gz |
Minor optimizations. (#332059, Arnaud Charlet)
2006-02-22 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextbtree.c:
* gtk/gtktextiter.c: Minor optimizations. (#332059, Arnaud Charlet)
Diffstat (limited to 'gtk/gtktextbtree.c')
-rw-r--r-- | gtk/gtktextbtree.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index 7916c88a18..9c3c3390c7 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -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); |