PlaylistSong: modify the given song object in-place

Reduce bloat.
This commit is contained in:
Max Kellermann
2014-01-20 23:48:46 +01:00
parent dd20a3ce7e
commit 4f120f3714
5 changed files with 87 additions and 123 deletions

View File

@@ -156,15 +156,13 @@ playlist_provider_print(Client &client, const char *uri,
DetachedSong *song;
while ((song = e.NextSong()) != nullptr) {
song = playlist_check_translate_song(song, base_uri.c_str(),
false);
if (song == nullptr)
continue;
if (detail)
song_print_info(client, *song);
else
song_print_uri(client, *song);
if (playlist_check_translate_song(*song, base_uri.c_str(),
false)) {
if (detail)
song_print_info(client, *song);
else
song_print_uri(client, *song);
}
delete song;
}