allow for empty strings in MPD::Song::SetTag()
if they weren't allowed, clearing tag value in tag editor would be impossible.
This commit is contained in:
@@ -504,8 +504,6 @@ const char *MPD::Song::MyFilename() const
|
|||||||
|
|
||||||
void MPD::Song::SetTag(mpd_tag_type type, unsigned pos, const std::string &value)
|
void MPD::Song::SetTag(mpd_tag_type type, unsigned pos, const std::string &value)
|
||||||
{
|
{
|
||||||
if (value.empty())
|
|
||||||
return;
|
|
||||||
if (!itsTags)
|
if (!itsTags)
|
||||||
itsTags = new TagMap;
|
itsTags = new TagMap;
|
||||||
(*itsTags)[std::make_pair(type, pos)] = value;
|
(*itsTags)[std::make_pair(type, pos)] = value;
|
||||||
|
|||||||
Reference in New Issue
Block a user