Index: compiled/filter/InvalidFilter.h |
=================================================================== |
--- a/compiled/filter/InvalidFilter.h |
+++ b/compiled/filter/InvalidFilter.h |
@@ -26,8 +26,17 @@ public: |
explicit InvalidFilter(const String& text, const String& reason); |
const String& BINDINGS_EXPORTED GetReason() const |
{ |
return mReason; |
}; |
private: |
OwnedString mReason; |
}; |
+ |
+template<> |
+inline InvalidFilter* Filter::As<InvalidFilter>() |
+{ |
+ if ((mType & Type::INVALID) == Type::INVALID) |
+ return nullptr; |
+ |
+ return static_cast<InvalidFilter*>(this); |
+} |