summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-09-03 08:50:13 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-09-03 18:07:54 +0200
commitdb57af5a0d7aa0687a19fef1cd385bee0f26f7b6 (patch)
tree0f903515e5c9d8a5e6b435499979fb0e184d6af5 /src/corelib
parent1c55a6caf1fc2b8a73a9a756bcf6894c5d4e4398 (diff)
QRegexp: Fix MSVC2019 warning about fallthrough not being followed by a case label
Move fallthrough down, fixing: tools\qregexp.cpp(3014): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label tools\qregexp.cpp(3054): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label tools\qregexp.cpp(3100): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label Change-Id: If25ddec5dc1d4929a3383729aabad89f5879e316 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qregexp.cpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp
index ef24c952eb..adca8624f9 100644
--- a/src/corelib/tools/qregexp.cpp
+++ b/src/corelib/tools/qregexp.cpp
@@ -3009,12 +3009,10 @@ int QRegExpEngine::getEscape()
yyCharClass->addSingleton(0x005f); // '_'
return Tok_CharClass;
case 'I':
- if (xmlSchemaExtensions) {
- yyCharClass->setNegative(!yyCharClass->negative());
- Q_FALLTHROUGH();
- } else {
+ if (!xmlSchemaExtensions)
break;
- }
+ yyCharClass->setNegative(!yyCharClass->negative());
+ Q_FALLTHROUGH();
case 'i':
if (xmlSchemaExtensions) {
yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing) |
@@ -3049,12 +3047,10 @@ int QRegExpEngine::getEscape()
break;
}
case 'C':
- if (xmlSchemaExtensions) {
- yyCharClass->setNegative(!yyCharClass->negative());
- Q_FALLTHROUGH();
- } else {
+ if (!xmlSchemaExtensions)
break;
- }
+ yyCharClass->setNegative(!yyCharClass->negative());
+ Q_FALLTHROUGH();
case 'c':
if (xmlSchemaExtensions) {
yyCharClass->addCategories(FLAG(QChar::Mark_NonSpacing) |
@@ -3095,12 +3091,10 @@ int QRegExpEngine::getEscape()
break;
}
case 'P':
- if (xmlSchemaExtensions) {
- yyCharClass->setNegative(!yyCharClass->negative());
- Q_FALLTHROUGH();
- } else {
+ if (!xmlSchemaExtensions)
break;
- }
+ yyCharClass->setNegative(!yyCharClass->negative());
+ Q_FALLTHROUGH();
case 'p':
if (xmlSchemaExtensions) {
if (yyCh != '{') {