Refactoring: replace forgotten code with function call 'simplifyRedundantConsecutiveBraces'.

This commit is contained in:
Edoardo Prezioso 2012-01-04 16:46:22 +01:00
parent 6f9cd110d0
commit b0e4dc3ab8
1 changed files with 1 additions and 9 deletions

View File

@ -4102,15 +4102,7 @@ bool Tokenizer::simplifyTokenList()
simplifyFlowControl();
// Remove redundant consecutive braces, i.e. '.. { { .. } } ..' -> '.. { .. } ..'.
for (Token *tok = _tokens; tok;) {
if (Token::simpleMatch(tok, "{ {") && Token::simpleMatch(tok->next()->link(), "} }")) {
//remove internal parentheses
tok->next()->link()->deleteThis();
tok->deleteNext();
} else
tok = tok->next();
}
simplifyRedundantConsecutiveBraces();
if (!validate())
return false;