From 9f24b54786d8371f77f9ba0c4475ed82b2e0e68f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 31 Jul 2015 17:57:04 -0400 Subject: Code cleanup Use g_slist_free_full more consistently. This commit just converts the obvious cases where g_slist_forall is directly followed by g_slist_free. --- gtk/gtkcellareabox.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'gtk/gtkcellareabox.c') diff --git a/gtk/gtkcellareabox.c b/gtk/gtkcellareabox.c index f0a72bc2ef..7ea9851db4 100644 --- a/gtk/gtkcellareabox.c +++ b/gtk/gtkcellareabox.c @@ -1292,16 +1292,15 @@ gtk_cell_area_box_foreach_alloc (GtkCellArea *area, break; } - g_slist_foreach (allocated_cells, (GFunc)allocated_cell_free, NULL); - g_slist_free (allocated_cells); + g_slist_free_full (allocated_cells, (GDestroyNotify)allocated_cell_free); } static void -gtk_cell_area_box_apply_attributes (GtkCellArea *area, - GtkTreeModel *tree_model, - GtkTreeIter *iter, - gboolean is_expander, - gboolean is_expanded) +gtk_cell_area_box_apply_attributes (GtkCellArea *area, + GtkTreeModel *tree_model, + GtkTreeIter *iter, + gboolean is_expander, + gboolean is_expanded) { GtkCellAreaBox *box = GTK_CELL_AREA_BOX (area); GtkCellAreaBoxPrivate *priv = box->priv; @@ -1309,7 +1308,7 @@ gtk_cell_area_box_apply_attributes (GtkCellArea *area, /* Call the parent class to apply the attributes */ GTK_CELL_AREA_CLASS - (gtk_cell_area_box_parent_class)->apply_attributes (area, tree_model, iter, + (gtk_cell_area_box_parent_class)->apply_attributes (area, tree_model, iter, is_expander, is_expanded); /* Update visible state for cell groups */ -- cgit v1.2.1