[pango/more-test-coverage2: 4/15] layout: Remove an overeager assertion
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/more-test-coverage2: 4/15] layout: Remove an overeager assertion
- Date: Tue, 6 Jul 2021 22:51:59 +0000 (UTC)
commit 892fbe3f3e41b31f3ec16897a2cdce468b816569
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jul 5 21:58:36 2021 -0400
layout: Remove an overeager assertion
pango_layout_get_direction contained an assertion that
would be hit when just iterating over all chars in the
text of the layout (it gets hit when you get to the final
newline).
Remove the assertion, so that this function is less
of a trap.
pango/pango-layout.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 17916fbe..f726c89c 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -1895,9 +1895,9 @@ pango_layout_index_to_line_x (PangoLayout *layout,
* of a run.
*
* Motion here is in cursor positions, not in characters, so a single
- * call to [method@Pango.Layout.move_cursor_visually] may move the cursor over
- * multiple characters when multiple characters combine to form a single
- * grapheme.
+ * call to [method@Pango.Layout.move_cursor_visually] may move the cursor
+ * over multiple characters when multiple characters combine to form a
+ * single grapheme.
*/
void
pango_layout_move_cursor_visually (PangoLayout *layout,
@@ -2378,8 +2378,6 @@ pango_layout_line_get_char_direction (PangoLayoutLine *layout_line,
run_list = run_list->next;
}
- g_assert_not_reached ();
-
return PANGO_DIRECTION_LTR;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]