From e1cec0fb11a2c178cb0f4603e79df5a5201f42da Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 4 Sep 2018 20:31:51 +0200 Subject: [PATCH] liststore: Simplify code This is also faster, though I doubt anyone's able to measure it. The previous code was a more complicted way to do the same thing and it was likely written the more complicated way because it fell out commit 758d7073a9485d770b25794f09a2dc32fef29ba1 when fixing https://bugzilla.gnome.org/show_bug.cgi?id=795307 --- gio/gliststore.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gio/gliststore.c b/gio/gliststore.c index c91dcb334..5b7d42678 100644 --- a/gio/gliststore.c +++ b/gio/gliststore.c @@ -486,8 +486,7 @@ g_list_store_splice (GListStore *store, return; } - it = g_sequence_insert_before (it, g_object_ref (additions[i])); - it = g_sequence_iter_next (it); + g_sequence_insert_before (it, g_object_ref (additions[i])); } }