From d4d571425de5d8083f4d3b3933b2e2f4abec27ba Mon Sep 17 00:00:00 2001 From: NBonaparte Date: Mon, 23 Oct 2017 15:07:03 -0700 Subject: [PATCH] refactor(mpd): Keep tag getters consistent --- src/adapters/mpd.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/adapters/mpd.cpp b/src/adapters/mpd.cpp index 4459a737..bbe37b74 100644 --- a/src/adapters/mpd.cpp +++ b/src/adapters/mpd.cpp @@ -69,10 +69,7 @@ namespace mpd { string mpdsong::get_artist() { assert(m_song); auto tag = mpd_song_get_tag(m_song.get(), MPD_TAG_ARTIST, 0); - if (tag == nullptr) { - return ""; - } - return string{tag}; + return string{tag != nullptr ? tag : ""}; } string mpdsong::get_album() {