diff options
author | Max Kellermann <max@duempel.org> | 2014-01-20 23:48:46 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-21 00:28:37 +0100 |
commit | 4f120f371474dbdc3e7ec4182d257dc9492d827b (patch) | |
tree | 48e5de91898765b801b980ed30135f0bf678c24c /src/PlaylistPrint.cxx | |
parent | dd20a3ce7e5d6bb3efd41a2c9ab5ba27e8e15248 (diff) | |
download | mpd-4f120f371474dbdc3e7ec4182d257dc9492d827b.tar.gz mpd-4f120f371474dbdc3e7ec4182d257dc9492d827b.tar.xz mpd-4f120f371474dbdc3e7ec4182d257dc9492d827b.zip |
PlaylistSong: modify the given song object in-place
Reduce bloat.
Diffstat (limited to '')
-rw-r--r-- | src/PlaylistPrint.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/PlaylistPrint.cxx b/src/PlaylistPrint.cxx index c984ea224..38d63f4e8 100644 --- a/src/PlaylistPrint.cxx +++ b/src/PlaylistPrint.cxx @@ -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; } |