builder: Use default size of 8 for the ObjectProperty arrays

This commit is contained in:
Timm Bäder 2020-06-11 15:30:34 +02:00
parent 7c9f2949ce
commit c6921cdc9d

View File

@ -474,11 +474,11 @@ object_properties_add (ObjectProperties *self,
const GValue *value) const GValue *value)
{ {
if (!self->names) if (!self->names)
self->names = g_ptr_array_new (); self->names = g_ptr_array_sized_new (8);
if (!self->values) if (!self->values)
{ {
self->values = g_array_new (FALSE, FALSE, sizeof (GValue)); self->values = g_array_sized_new (FALSE, FALSE, sizeof (GValue), 8);
g_array_set_clear_func (self->values, (GDestroyNotify) g_value_unset); g_array_set_clear_func (self->values, (GDestroyNotify) g_value_unset);
} }