diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-03-29 12:59:19 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-03-30 22:16:47 +0000 |
commit | f799a226b1025bf7158bc00dff35ee060f57a137 (patch) | |
tree | 409168c9cc203681029ba2295bb54e4a24381257 /src/xmlpatterns/parser/qxslttokenizer.cpp | |
parent | 2e07221d52162231755d1bd521478a899f47da19 (diff) | |
download | qtxmlpatterns-f799a226b1025bf7158bc00dff35ee060f57a137.tar.gz |
Cleanup implicit fallthroughs in xmlpatterns5.8
Use Q_FALLTHOUGH instead of comments, and use it consistently.
Change-Id: Ieaf4867b612e624774011275b90cdd3678a29fe9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/xmlpatterns/parser/qxslttokenizer.cpp')
-rw-r--r-- | src/xmlpatterns/parser/qxslttokenizer.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/xmlpatterns/parser/qxslttokenizer.cpp b/src/xmlpatterns/parser/qxslttokenizer.cpp index f878e72..38e0374 100644 --- a/src/xmlpatterns/parser/qxslttokenizer.cpp +++ b/src/xmlpatterns/parser/qxslttokenizer.cpp @@ -562,7 +562,6 @@ QString XSLTTokenizer::readElementText() continue; } case QXmlStreamReader::Comment: - /* Fallthrough. */ case QXmlStreamReader::ProcessingInstruction: continue; case QXmlStreamReader::EndElement: @@ -718,11 +717,8 @@ void XSLTTokenizer::handleStandardAttributes(const bool isXSLTElement) switch(toToken(att.name())) { case Type: - /* Fallthrough. */ case Validation: - /* Fallthrough. */ case UseAttributeSets: - /* Fallthrough. */ case Version: /* These are handled by other function such as * handleValidationAttributes() and handleXSLTVersion(). */ @@ -1236,7 +1232,6 @@ void XSLTTokenizer::insideChoose(TokenSource::Queue *const to) break; } case QXmlStreamReader::Comment: - /* Fallthrough. */ case QXmlStreamReader::ProcessingInstruction: continue; case QXmlStreamReader::Characters: @@ -1245,10 +1240,9 @@ void XSLTTokenizer::insideChoose(TokenSource::Queue *const to) * 4.2 Stripping Whitespace from the Stylesheet. */ if(isWhitespace()) continue; - /* Fallthrough. */ + Q_FALLTHROUGH(); } default: - /* Fallthrough. */ unexpectedContent(); break; } @@ -2071,7 +2065,6 @@ bool XSLTTokenizer::insideSequenceConstructor(TokenSource::Queue *const to, return hasWrittenExpression; } case QXmlStreamReader::ProcessingInstruction: - /* Fallthrough. */ case QXmlStreamReader::Comment: /* We do nothing, we just ignore them. */ continue; @@ -2162,7 +2155,6 @@ void XSLTTokenizer::queueWithParams(const XSLTTokenLookup::NodeName parentName, continue; } case QXmlStreamReader::ProcessingInstruction: - /* Fallthrough. */ case QXmlStreamReader::Comment: continue; case QXmlStreamReader::Characters: @@ -2241,7 +2233,7 @@ void XSLTTokenizer::queueParams(const XSLTTokenLookup::NodeName parentName, { if(whitespaceToSkip()) continue; - /* Fallthrough. */ + Q_FALLTHROUGH(); } case QXmlStreamReader::EndElement: return; @@ -2327,13 +2319,12 @@ void XSLTTokenizer::insideAttributeSet() case QXmlStreamReader::EndElement: return; case QXmlStreamReader::ProcessingInstruction: - /* Fallthrough. */ case QXmlStreamReader::Comment: continue; case QXmlStreamReader::Characters: if(whitespaceToSkip()) continue; - /* Fallthrough. */ + Q_FALLTHROUGH(); default: unexpectedContent(); } @@ -2384,7 +2375,6 @@ void XSLTTokenizer::insideStylesheetModule() break; } case StripSpace: - /* Fallthrough. */ case PreserveSpace: { // TODO @elements @@ -2532,9 +2522,7 @@ void XSLTTokenizer::queueSorting(const bool oneSortRequired, switch(currentElementName()) { case PerformSort: - /* Fallthrough. */ case ForEach: - /* Fallthrough. */ case ApplyTemplates: return; default: @@ -2645,7 +2633,6 @@ void XSLTTokenizer::queueSorting(const bool oneSortRequired, break; } case QXmlStreamReader::ProcessingInstruction: - /* Fallthrough. */ case QXmlStreamReader::Comment: continue; default: |