[gtk/wip/baedert/css-values: 6/8] cssarrayvalue: Reserve 2 pointers when parsing array values



commit 0e0751648ac5cc6cd147c3be129aeabfb22c18a5
Author: Timm Bäder <mail baedert org>
Date:   Wed Jan 8 08:58:07 2020 +0100

    cssarrayvalue: Reserve 2 pointers when parsing array values
    
    given that we parse an array, chances are we're gonna see 2 values.

 gtk/gtkcssarrayvalue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkcssarrayvalue.c b/gtk/gtkcssarrayvalue.c
index 60019fea5c..02ece79fbd 100644
--- a/gtk/gtkcssarrayvalue.c
+++ b/gtk/gtkcssarrayvalue.c
@@ -413,7 +413,7 @@ _gtk_css_array_value_parse (GtkCssParser *parser,
   GtkCssValue *value, *result;
   GPtrArray *values;
 
-  values = g_ptr_array_new ();
+  values = g_ptr_array_sized_new (2);
 
   do {
     value = parse_func (parser);


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