aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistPrint.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-20 23:48:46 +0100
committerMax Kellermann <max@duempel.org>2014-01-21 00:28:37 +0100
commit4f120f371474dbdc3e7ec4182d257dc9492d827b (patch)
tree48e5de91898765b801b980ed30135f0bf678c24c /src/PlaylistPrint.cxx
parentdd20a3ce7e5d6bb3efd41a2c9ab5ba27e8e15248 (diff)
downloadmpd-4f120f371474dbdc3e7ec4182d257dc9492d827b.tar.gz
mpd-4f120f371474dbdc3e7ec4182d257dc9492d827b.tar.xz
mpd-4f120f371474dbdc3e7ec4182d257dc9492d827b.zip
PlaylistSong: modify the given song object in-place
Reduce bloat.
Diffstat (limited to 'src/PlaylistPrint.cxx')
-rw-r--r--src/PlaylistPrint.cxx16
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;
}