[gtk/vfl-error] Fix message for VFL parser errors



commit 7de62118a0f80f88106b9d484625d6d580eec144
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Mar 11 15:14:17 2020 +0000

    Fix message for VFL parser errors
    
    The loop is iterating over the wrong variable, and it's reimplementing
    g_strfill() in a less efficient way.

 gtk/gtkconstraintlayout.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
---
diff --git a/gtk/gtkconstraintlayout.c b/gtk/gtkconstraintlayout.c
index 497d748d72..7f012da0c6 100644
--- a/gtk/gtkconstraintlayout.c
+++ b/gtk/gtkconstraintlayout.c
@@ -2016,14 +2016,7 @@ gtk_constraint_layout_add_constraints_from_descriptionv (GtkConstraintLayout *la
           char *squiggly = NULL;
 
           if (range > 0)
-            {
-              squiggly = g_new (char, range + 1);
-
-              for (int r = 0; r < range; i++)
-                squiggly[r] = '~';
-
-              squiggly[range] = '\0';
-            }
+            squiggly = g_strnfill (range, '~');
 
           g_set_error (error, GTK_CONSTRAINT_VFL_PARSER_ERROR,
                        internal_error->code,


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