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:
Edoardo Prezioso 2012-10-09 18:21:35 +02:00
parent 9668508b32
commit 3703e71f82
1 changed files with 3 additions and 2 deletions

View File

@ -2386,10 +2386,11 @@ void Tokenizer::simplifyLabelsCaseDefault()
if (Token::Match(tok, "[;{}] case")) {
while (NULL != (tok = tok->next())) {
if (Token::Match(tok,"[:{};]"))
if (Token::Match(tok->next(),"[:{};]"))
break;
}
if (tok->str() == ":" && tok->next()->str() != ";") {
if (tok->next()->str() == ":" && tok->strAt(2) != ";") {
tok = tok->next();
tok->insertToken(";");
}
} else if (Token::Match(tok, "[;{}] %var% : !!;")) {