From eaa15870ec1078f7ffda00ab01133e4bfe2a8c19 Mon Sep 17 00:00:00 2001 From: teuf Date: Wed, 14 Nov 2007 18:12:10 +0000 Subject: * src/itdb_photoalbum.c: use g_list_remove all instead of an inefficient combination of g_list_find + g_list_remove git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1783 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- src/itdb_photoalbum.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/itdb_photoalbum.c b/src/itdb_photoalbum.c index e53686a..994875e 100644 --- a/src/itdb_photoalbum.c +++ b/src/itdb_photoalbum.c @@ -615,10 +615,7 @@ void itdb_photodb_remove_photo (Itdb_PhotoDB *db, for (it = db->photoalbums; it != NULL; it = it->next) { Itdb_PhotoAlbum *_album = it->data; - while (g_list_find (_album->members, photo)) - { - _album->members = g_list_remove (_album->members, photo); - } + _album->members = g_list_remove_all (_album->members, photo); } /* Remove the photo from the image list */ db->photos = g_list_remove (db->photos, photo); -- cgit