From 4a70a73e42ca9e87242b853b9a43e7219b914bf3 Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Wed, 3 Nov 2021 16:24:06 +0800 Subject: [PATCH] clutter/actor: Deduplicate child destruction loop It's identical in clutter_actor_real_destroy and clutter_actor_destroy_all_children, other than the latter having some extra error checking. Part-of: --- clutter/clutter/clutter-actor.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c index 722b5cbda..00f51b04f 100644 --- a/clutter/clutter/clutter-actor.c +++ b/clutter/clutter/clutter-actor.c @@ -5904,15 +5904,7 @@ clutter_actor_real_calculate_resource_scale (ClutterActor *self, static void clutter_actor_real_destroy (ClutterActor *actor) { - ClutterActorIter iter; - - g_object_freeze_notify (G_OBJECT (actor)); - - clutter_actor_iter_init (&iter, actor); - while (clutter_actor_iter_next (&iter, NULL)) - clutter_actor_iter_destroy (&iter); - - g_object_thaw_notify (G_OBJECT (actor)); + clutter_actor_destroy_all_children (actor); } static GObject *