[goobox] simplified track list duplication



commit b440dfce116f1192b8e5b7736e16e2cc5e3337b9
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Dec 30 12:55:13 2018 +0100

    simplified track list duplication

 src/track-info.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/src/track-info.c b/src/track-info.c
index bbd7c85..577e8f1 100644
--- a/src/track-info.c
+++ b/src/track-info.c
@@ -171,15 +171,9 @@ track_info_copy_metadata (TrackInfo  *to_track,
 GList *
 track_list_dup (GList *track_list)
 {
-       GList *new_list;
-
        if (track_list == NULL)
                return NULL;
-
-       new_list = g_list_copy (track_list);
-       g_list_foreach (new_list, (GFunc) track_info_ref, NULL);
-
-       return new_list;
+       return g_list_copy_deep (track_list, (GCopyFunc) track_info_copy, NULL);
 }
 
 


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