From b1c2a1c015b94131d7c2596957e969196871573b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 20 May 2023 18:52:44 -0400 Subject: [PATCH] listitemmanager: Use gc_tiles Replace an open-coded version of this function with a call to gtk_list_item_manager_gc_tiles. --- gtk/gtklistitemmanager.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gtk/gtklistitemmanager.c b/gtk/gtklistitemmanager.c index 0945241c1b..599d6d0c39 100644 --- a/gtk/gtklistitemmanager.c +++ b/gtk/gtklistitemmanager.c @@ -1606,7 +1606,6 @@ static void gtk_list_item_manager_clear_model (GtkListItemManager *self) { GtkListItemChange change; - GtkListTile *tile; GSList *l; if (self->model == NULL) @@ -1628,11 +1627,8 @@ gtk_list_item_manager_clear_model (GtkListItemManager *self) self); g_clear_object (&self->model); - /* really empty the tiles */ - for (tile = gtk_list_tile_gc (self, gtk_list_item_manager_get_first (self)); - tile; - tile = gtk_list_tile_gc (self, tile)) - { } + gtk_list_item_manager_gc_tiles (self); + g_assert (gtk_rb_tree_get_root (self->items) == NULL); }