summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-03-15 19:06:56 +0100
committerMax Kellermann <max@musicpd.org>2019-03-15 19:06:56 +0100
commit1881b0e975b4be8f01c798ef7c0a9e061583b815 (patch)
tree72bc29c1e43641039f51d80866ae5c7dee945a23 /src
parent98b29f6d1c3d14ec2a6fd83f72c3b96f7a7ce171 (diff)
song/TagSongFilter: rename MatchNN() to Match()
The "NN" suffix used to mean "no negation", but that's not how it's implemented today.
Diffstat (limited to 'src')
-rw-r--r--src/song/TagSongFilter.cxx8
-rw-r--r--src/song/TagSongFilter.hxx4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/song/TagSongFilter.cxx b/src/song/TagSongFilter.cxx
index 547172a4c..b04a38437 100644
--- a/src/song/TagSongFilter.cxx
+++ b/src/song/TagSongFilter.cxx
@@ -35,14 +35,14 @@ TagSongFilter::ToExpression() const noexcept
}
bool
-TagSongFilter::MatchNN(const TagItem &item) const noexcept
+TagSongFilter::Match(const TagItem &item) const noexcept
{
return (type == TAG_NUM_OF_ITEM_TYPES || item.type == type) &&
filter.Match(item.value);
}
bool
-TagSongFilter::MatchNN(const Tag &tag) const noexcept
+TagSongFilter::Match(const Tag &tag) const noexcept
{
bool visited_types[TAG_NUM_OF_ITEM_TYPES];
std::fill_n(visited_types, size_t(TAG_NUM_OF_ITEM_TYPES), false);
@@ -50,7 +50,7 @@ TagSongFilter::MatchNN(const Tag &tag) const noexcept
for (const auto &i : tag) {
visited_types[i.type] = true;
- if (MatchNN(i))
+ if (Match(i))
return true;
}
@@ -89,5 +89,5 @@ TagSongFilter::MatchNN(const Tag &tag) const noexcept
bool
TagSongFilter::Match(const LightSong &song) const noexcept
{
- return MatchNN(song.tag);
+ return Match(song.tag);
}
diff --git a/src/song/TagSongFilter.hxx b/src/song/TagSongFilter.hxx
index e60910934..6d0449d61 100644
--- a/src/song/TagSongFilter.hxx
+++ b/src/song/TagSongFilter.hxx
@@ -68,8 +68,8 @@ public:
bool Match(const LightSong &song) const noexcept override;
private:
- bool MatchNN(const Tag &tag) const noexcept;
- bool MatchNN(const TagItem &tag) const noexcept;
+ bool Match(const Tag &tag) const noexcept;
+ bool Match(const TagItem &tag) const noexcept;
};
#endif