| Index: compiled/filter/RegExpFilter.h |
| =================================================================== |
| --- a/compiled/filter/RegExpFilter.h |
| +++ b/compiled/filter/RegExpFilter.h |
| @@ -106,8 +106,17 @@ public: |
| explicit RegExpFilter(Type type, const String& text, const RegExpFilterData& data); |
| ~RegExpFilter(); |
| static Type Parse(DependentString& text, DependentString& error, |
| RegExpFilterData& data); |
| static void GenerateCustomBindings(); |
| bool BINDINGS_EXPORTED Matches(const String& location, int typeMask, |
| DependentString& docDomain, bool thirdParty, const String& sitekey) const; |
| }; |
| + |
| +template<> |
| +inline RegExpFilter* Filter::As<RegExpFilter>() |
| +{ |
| + if ((mType & Type::REGEXP) == Type::REGEXP) |
| + return nullptr; |
| + |
| + return static_cast<RegExpFilter*>(this); |
| +} |