paned: Remove unnecessary local variable
authorTimm Bäder <mail@baedert.org>
Sat, 16 Jun 2018 18:15:18 +0000 (20:15 +0200)
committerTimm Bäder <mail@baedert.org>
Mon, 18 Jun 2018 15:35:02 +0000 (17:35 +0200)
We can just pass the given allocation on.

gtk/gtkpaned.c

index 9fcf23e1980e07b3b1ab31f026c05a1e170ca7ba..86cf3c6d710908bc2debe1aaaece47d9c8a6fb00 100644 (file)
@@ -1329,26 +1329,19 @@ gtk_paned_size_allocate (GtkWidget           *widget,
     }
   else
     {
-      GtkAllocation child_allocation;
-
-      child_allocation.x = allocation->x;
-      child_allocation.y = allocation->y;
-      child_allocation.width = allocation->width;
-      child_allocation.height = allocation->height;
-
       if (priv->child1 && gtk_widget_get_visible (priv->child1))
         {
           gtk_paned_set_child_visible (paned, CHILD1, TRUE);
           gtk_paned_set_child_visible (paned, CHILD2, FALSE);
 
-          gtk_widget_size_allocate (priv->child1, &child_allocation, -1);
+          gtk_widget_size_allocate (priv->child1, allocation, -1);
         }
       else if (priv->child2 && gtk_widget_get_visible (priv->child2))
         {
           gtk_paned_set_child_visible (paned, CHILD1, FALSE);
           gtk_paned_set_child_visible (paned, CHILD2, TRUE);
 
-          gtk_widget_size_allocate (priv->child2, &child_allocation, -1);
+          gtk_widget_size_allocate (priv->child2, allocation, -1);
         }
       else
         {