song/TagSongFilter: eliminate Match(TagItem)

This commit is contained in:
Max Kellermann 2019-03-15 20:28:27 +01:00
parent b850eb74b7
commit 9e9418294a
2 changed files with 2 additions and 9 deletions

View File

@ -34,13 +34,6 @@ TagSongFilter::ToExpression() const noexcept
+ " \"" + EscapeFilterString(filter.GetValue()) + "\")";
}
bool
TagSongFilter::Match(const TagItem &item) const noexcept
{
return (type == TAG_NUM_OF_ITEM_TYPES || item.type == type) &&
filter.Match(item.value);
}
bool
TagSongFilter::Match(const Tag &tag) const noexcept
{
@ -49,7 +42,8 @@ TagSongFilter::Match(const Tag &tag) const noexcept
for (const auto &i : tag) {
visited_types[i.type] = true;
if (Match(i))
if ((type == TAG_NUM_OF_ITEM_TYPES || i.type == type) &&
filter.Match(i.value))
return true;
}

View File

@ -69,7 +69,6 @@ public:
private:
bool Match(const Tag &tag) const noexcept;
bool Match(const TagItem &tag) const noexcept;
};
#endif