menubar: prefer early return

This commit is contained in:
Cosimo Cecchi
2016-01-02 14:59:56 -08:00
parent 700286c6d8
commit d8b6dbd888

View File

@ -512,8 +512,9 @@ gtk_menu_bar_allocate (GtkCssGadget *gadget,
menu_shell = GTK_MENU_SHELL (widget); menu_shell = GTK_MENU_SHELL (widget);
priv = menu_bar->priv; priv = menu_bar->priv;
if (menu_shell->priv->children) if (!menu_shell->priv->children)
{ return;
remaining_space = *allocation; remaining_space = *allocation;
requested_sizes = g_array_new (FALSE, FALSE, sizeof (GtkRequestedSize)); requested_sizes = g_array_new (FALSE, FALSE, sizeof (GtkRequestedSize));
@ -629,7 +630,7 @@ gtk_menu_bar_allocate (GtkCssGadget *gadget,
g_array_free (requested_sizes, TRUE); g_array_free (requested_sizes, TRUE);
} }
}
static void static void
gtk_menu_bar_size_allocate (GtkWidget *widget, gtk_menu_bar_size_allocate (GtkWidget *widget,
GtkAllocation *allocation) GtkAllocation *allocation)