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



commit cc8a68f670ff93d39ed80185964e5e2a4922af8c
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]