[gtk+] Remove useless get_iter_at_line calls.
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Remove useless get_iter_at_line calls.
- Date: Sun, 18 Dec 2011 16:55:08 +0000 (UTC)
commit 7f301cf8222195ec5b45f03b7a23e8340c664737
Author: Paolo Borelli <pborelli gnome org>
Date: Sun Dec 18 17:35:08 2011 +0100
Remove useless get_iter_at_line calls.
No need to call _gtk_text_btree_get_iter_at_line right before calling
totally_invisible_line, since it is the first thing it does itself.
gtk/gtktextlayout.c | 15 +--------------
1 files changed, 1 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c
index a78886a..aa456e3 100644
--- a/gtk/gtktextlayout.c
+++ b/gtk/gtktextlayout.c
@@ -1968,9 +1968,6 @@ update_text_display_cursors (GtkTextLayout *layout,
display->cursors_invalid = FALSE;
- _gtk_text_btree_get_iter_at_line (_gtk_text_buffer_get_btree (layout->buffer),
- &iter, line, 0);
-
/* Special-case optimization for completely
* invisible lines; makes it faster to deal
* with sequences of invisible lines.
@@ -2157,9 +2154,6 @@ gtk_text_layout_get_line_display (GtkTextLayout *layout,
display->line = line;
display->insert_index = -1;
- _gtk_text_btree_get_iter_at_line (_gtk_text_buffer_get_btree (layout->buffer),
- &iter, line, 0);
-
/* Special-case optimization for completely
* invisible lines; makes it faster to deal
* with sequences of invisible lines.
@@ -3572,12 +3566,8 @@ gtk_text_layout_move_iter_visually (GtkTextLayout *layout,
do
{
line = _gtk_text_line_previous (line);
-
if (!line)
goto done;
-
- _gtk_text_btree_get_iter_at_line (_gtk_text_buffer_get_btree (layout->buffer),
- &lineiter, line, 0);
}
while (totally_invisible_line (layout, line, &lineiter));
@@ -3593,12 +3583,9 @@ gtk_text_layout_move_iter_visually (GtkTextLayout *layout,
line = _gtk_text_line_next_excluding_last (line);
if (!line)
goto done;
-
- _gtk_text_btree_get_iter_at_line (_gtk_text_buffer_get_btree (layout->buffer),
- &lineiter, line, 0);
}
while (totally_invisible_line (layout, line, &lineiter));
-
+
gtk_text_layout_free_line_display (layout, display);
display = gtk_text_layout_get_line_display (layout, line, FALSE);
new_index = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]