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:
Carlos Garnacho 2020-04-24 22:21:08 +02:00
parent ccfffb2578
commit 777fd92eba

View File

@ -452,8 +452,6 @@ gtk_pad_controller_add_entry (GtkPadController *controller,
.action_name = g_strdup (entry->action_name) .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++) for (i = 0; i < controller->action_entries->len; i++)
{ {
if (entry_compare_func (&new_entry, if (entry_compare_func (&new_entry,