song/StringFilter: move negated flag from containing class

This commit is contained in:
Max Kellermann
2018-11-07 23:47:31 +01:00
parent db51cc4e02
commit 73b22d82aa
7 changed files with 53 additions and 26 deletions

View File

@@ -23,8 +23,8 @@
#include <assert.h>
bool
StringFilter::Match(const char *s) const noexcept
inline bool
StringFilter::MatchWithoutNegation(const char *s) const noexcept
{
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
@@ -41,3 +41,9 @@ StringFilter::Match(const char *s) const noexcept
: value == s;
}
}
bool
StringFilter::Match(const char *s) const noexcept
{
return MatchWithoutNegation(s) != negated;
}