[gtk/vfl-error] Fix message for VFL parser errors
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/vfl-error] Fix message for VFL parser errors
- Date: Wed, 11 Mar 2020 15:16:17 +0000 (UTC)
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]