[glib/wip/otte/simplify-liststore-splice] liststore: Simplify code



commit e1cec0fb11a2c178cb0f4603e79df5a5201f42da
Author: Benjamin Otte <otte redhat com>
Date:   Tue Sep 4 20:31:51 2018 +0200

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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]