Tokenizer: Optimised loop
This commit is contained in:
parent
33e69df6ae
commit
9cfc1030cd
|
@ -5114,8 +5114,9 @@ void Tokenizer::simplifyVarDecl(Token * tokBegin, Token * tokEnd, bool only_k_r_
|
||||||
} else
|
} else
|
||||||
continue;
|
continue;
|
||||||
} else if (tok->str() == "(") {
|
} else if (tok->str() == "(") {
|
||||||
|
if (isCPP()) {
|
||||||
for (Token * tok2 = tok; tok2 != tok->link(); tok2 = tok2->next()) {
|
for (Token * tok2 = tok; tok2 != tok->link(); tok2 = tok2->next()) {
|
||||||
if (isCPP() && Token::Match(tok2, "[(,] [")) {
|
if (Token::Match(tok2, "[(,] [")) {
|
||||||
// lambda function at tok2->next()
|
// lambda function at tok2->next()
|
||||||
// find start of lambda body
|
// find start of lambda body
|
||||||
Token * lambdaBody = tok2;
|
Token * lambdaBody = tok2;
|
||||||
|
@ -5125,6 +5126,7 @@ void Tokenizer::simplifyVarDecl(Token * tokBegin, Token * tokEnd, bool only_k_r_
|
||||||
simplifyVarDecl(lambdaBody, lambdaBody->link()->next(), only_k_r_fpar);
|
simplifyVarDecl(lambdaBody, lambdaBody->link()->next(), only_k_r_fpar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
tok = tok->link();
|
tok = tok->link();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue