Refactoring: replace forgotten code with function call 'simplifyRedundantConsecutiveBraces'.
This commit is contained in:
parent
6f9cd110d0
commit
b0e4dc3ab8
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue