diff options
Diffstat (limited to 'src/desktop/Rule.cpp')
| -rw-r--r-- | src/desktop/Rule.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/desktop/Rule.cpp b/src/desktop/Rule.cpp index aa87a483..93f38de0 100644 --- a/src/desktop/Rule.cpp +++ b/src/desktop/Rule.cpp @@ -6,17 +6,17 @@ CRuleRegexContainer::CRuleRegexContainer(const std::string& regex_) { const bool NEGATIVE = regex_.starts_with("negative:"); - negative = NEGATIVE; - regex = makeUnique<RE2>(NEGATIVE ? regex_.substr(9) : regex_); + m_negative = NEGATIVE; + m_regex = makeUnique<RE2>(NEGATIVE ? regex_.substr(9) : regex_); // TODO: maybe pop an error? - if (!regex->ok()) + if (!m_regex->ok()) Debug::log(ERR, "RuleRegexContainer: regex {} failed to parse!", regex_); } bool CRuleRegexContainer::passes(const std::string& str) const { - if (!regex) + if (!m_regex) return false; - return RE2::FullMatch(str, *regex) != negative; + return RE2::FullMatch(str, *m_regex) != m_negative; }
\ No newline at end of file |
