Related to previous commit: if the '{}' parenthesis are found after 'case', don't skip them after continuing to the main loop or it will cause indentlevel mismatching.
This commit is contained in:
parent
9668508b32
commit
3703e71f82
|
@ -2386,10 +2386,11 @@ void Tokenizer::simplifyLabelsCaseDefault()
|
||||||
|
|
||||||
if (Token::Match(tok, "[;{}] case")) {
|
if (Token::Match(tok, "[;{}] case")) {
|
||||||
while (NULL != (tok = tok->next())) {
|
while (NULL != (tok = tok->next())) {
|
||||||
if (Token::Match(tok,"[:{};]"))
|
if (Token::Match(tok->next(),"[:{};]"))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (tok->str() == ":" && tok->next()->str() != ";") {
|
if (tok->next()->str() == ":" && tok->strAt(2) != ";") {
|
||||||
|
tok = tok->next();
|
||||||
tok->insertToken(";");
|
tok->insertToken(";");
|
||||||
}
|
}
|
||||||
} else if (Token::Match(tok, "[;{}] %var% : !!;")) {
|
} else if (Token::Match(tok, "[;{}] %var% : !!;")) {
|
||||||
|
|
Loading…
Reference in New Issue