summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Fergeau <teuf@gnome.org>2007-11-14 18:12:10 +0000
committerChristophe Fergeau <teuf@gnome.org>2007-11-14 18:12:10 +0000
commit5a360a706c80eb039d7b2c81a6cf12d4e711755f (patch)
tree2cd1817b1a7d9eacb808b7c8b00e2da3df808e4e /src
parent896908b699c76879f290d0db3326e07dbcc21261 (diff)
downloadlibgpod-5a360a706c80eb039d7b2c81a6cf12d4e711755f.tar.gz
libgpod-5a360a706c80eb039d7b2c81a6cf12d4e711755f.tar.xz
libgpod-5a360a706c80eb039d7b2c81a6cf12d4e711755f.zip
* 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
Diffstat (limited to 'src')
-rw-r--r--src/itdb_photoalbum.c5
1 files changed, 1 insertions, 4 deletions
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);