| Index: compiled/filter/CommentFilter.h |
| =================================================================== |
| --- a/compiled/filter/CommentFilter.h |
| +++ b/compiled/filter/CommentFilter.h |
| @@ -21,8 +21,17 @@ |
| class CommentFilter : public Filter |
| { |
| public: |
| explicit CommentFilter(const String& text); |
| static Type Parse(const String& text); |
| static CommentFilter* Create(const String& text); |
| }; |
| + |
| +template<> |
| +inline CommentFilter* Filter::As<CommentFilter>() |
| +{ |
| + if ((mType & Type::COMMENT) == Type::COMMENT) |
|
sergei
2017/10/12 12:24:34
Tests would be very helpful, so far it seems it al
Wladimir Palant
2017/10/13 11:43:28
This is C++ internals, so it cannot be tested dire
|
| + return nullptr; |
| + |
| + return static_cast<CommentFilter*>(this); |
| +} |