[gtk+/gtk-2-24] TextView: Be const-correct when passing a pointer



commit fd939f00528f8c06bb96a3f24857e1469c19bcfb
Author: Daniel Boles <dboles src gnome org>
Date:   Mon Mar 27 19:14:38 2017 +0100

    TextView: Be const-correct when passing a pointer
    
    The TextIter is passed by pointer for efficiency. We neither need to
    modify it, nor should we leave it possible to accidentally do so. So,
    it should be passed as a pointer-to-const.

 gtk/gtktextview.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index a869fb0..55101c6 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -5068,7 +5068,7 @@ move_cursor (GtkTextView       *text_view,
 }
 
 static gboolean
-iter_line_is_rtl (GtkTextIter *iter)
+iter_line_is_rtl (const GtkTextIter *iter)
 {
   GtkTextIter start, end;
   char *text;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]