Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: compiled/filter/CommentFilter.cpp

Issue 29383816: Issue 4989 - [emscripten] Move filter class files into a separate directory (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Created March 14, 2017, 3:34 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « compiled/filter/CommentFilter.h ('k') | compiled/filter/ElemHideBase.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "CommentFilter.h" 1 #include "CommentFilter.h"
2 2
3 CommentFilter::CommentFilter(const String& text) 3 CommentFilter::CommentFilter(const String& text)
4 : Filter(Type::COMMENT, text) 4 : Filter(Type::COMMENT, text)
5 { 5 {
6 } 6 }
7 7
8 Filter::Type CommentFilter::Parse(const String& text) 8 Filter::Type CommentFilter::Parse(const String& text)
9 { 9 {
10 if (text.length() && text[0] == u'!') 10 if (text.length() && text[0] == u'!')
11 return Type::COMMENT; 11 return Type::COMMENT;
12 else 12 else
13 return Type::UNKNOWN; 13 return Type::UNKNOWN;
14 } 14 }
15 15
16 CommentFilter* CommentFilter::Create(const String& text) 16 CommentFilter* CommentFilter::Create(const String& text)
17 { 17 {
18 Type type = Parse(text); 18 Type type = Parse(text);
19 if (type == Type::COMMENT) 19 if (type == Type::COMMENT)
20 return new CommentFilter(text); 20 return new CommentFilter(text);
21 else 21 else
22 return nullptr; 22 return nullptr;
23 } 23 }
OLDNEW
« no previous file with comments | « compiled/filter/CommentFilter.h ('k') | compiled/filter/ElemHideBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld