song/StringFilter: simplify GetOperator()
This commit is contained in:
parent
c158abe87c
commit
9ca75589c0
@ -99,13 +99,16 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *GetOperator() const noexcept {
|
const char *GetOperator() const noexcept {
|
||||||
return IsRegex()
|
if (IsRegex())
|
||||||
? (negated ? "!~" : "=~")
|
return negated ? "!~" : "=~";
|
||||||
: (substring
|
|
||||||
? (negated ? "!contains" : "contains")
|
if (substring)
|
||||||
: (starts_with
|
return negated ? "!contains" : "contains";
|
||||||
? (negated ? "!starts_with" : "starts_with")
|
|
||||||
: (negated ? "!=" : "==")));
|
if (starts_with)
|
||||||
|
return negated ? "!starts_with" : "starts_with";
|
||||||
|
|
||||||
|
return negated ? "!=" : "==";
|
||||||
}
|
}
|
||||||
|
|
||||||
[[gnu::pure]]
|
[[gnu::pure]]
|
||||||
|
Loading…
Reference in New Issue
Block a user