mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
gtkpadcontroller: Avoid filling action list with empty elements
We don't need to set the array size if we are adding elements afterwards.
This commit is contained in:
parent
ccfffb2578
commit
777fd92eba
@ -452,8 +452,6 @@ gtk_pad_controller_add_entry (GtkPadController *controller,
|
||||
.action_name = g_strdup (entry->action_name)
|
||||
};
|
||||
|
||||
g_array_set_size (controller->action_entries, controller->action_entries->len + 1);
|
||||
|
||||
for (i = 0; i < controller->action_entries->len; i++)
|
||||
{
|
||||
if (entry_compare_func (&new_entry,
|
||||
|
Loading…
Reference in New Issue
Block a user