theatrics: use foreach_remove instead of foreach and call remove inside

parent c3a1bafc
......@@ -177,7 +177,7 @@ gedit_theatrics_stage_init (GeditTheatricsStage *stage)
static void
static gboolean
iterate_actors (gpointer key,
gpointer value,
GeditTheatricsStage *stage)
......@@ -188,10 +188,7 @@ iterate_actors (gpointer key,
g_signal_emit (G_OBJECT (stage), signals[ACTOR_STEP], 0, actor);
if (gedit_theatrics_actor_get_expired (actor))
g_hash_table_remove (stage->priv->actors, key);
return gedit_theatrics_actor_get_expired (actor);
static gboolean
......@@ -203,9 +200,9 @@ on_timeout (GeditTheatricsStage *stage)
return FALSE;
g_hash_table_foreach (stage->priv->actors,
g_hash_table_foreach_remove (stage->priv->actors,
g_signal_emit (G_OBJECT (stage), signals[ITERATION], 0);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment