1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-11 13:50:56 -05:00

refactor(mpd): Keep tag getters consistent

This commit is contained in:
NBonaparte 2017-10-23 15:07:03 -07:00
parent 5737156ae5
commit d4d571425d

View file

@ -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() {