listitemmanager: Use gc_tiles

Replace an open-coded version of this function
with a call to gtk_list_item_manager_gc_tiles.
This commit is contained in:
Matthias Clasen 2023-05-20 18:52:44 -04:00
parent 31d03f9f26
commit b1c2a1c015

View File

@ -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);
}