speedup of CheckOther::postIncrement
This commit is contained in:
parent
b172d62cae
commit
321106c39e
|
@ -1128,11 +1128,11 @@ void CheckOther::postIncrement()
|
||||||
{
|
{
|
||||||
for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next())
|
for (const Token *tok = _tokenizer->tokens(); tok; tok = tok->next())
|
||||||
{
|
{
|
||||||
if (!Token::simpleMatch(tok, "for ("))
|
if (Token::simpleMatch(tok, "for ("))
|
||||||
continue;
|
|
||||||
|
|
||||||
for (const Token *tok2 = tok; tok2; tok2 = tok2->next())
|
|
||||||
{
|
{
|
||||||
|
const Token *tok2 = tok->next()->link();
|
||||||
|
if (tok2)
|
||||||
|
tok2 = tok2->tokAt(-3);
|
||||||
if (Token::Match(tok2, "; %var% ++|-- )"))
|
if (Token::Match(tok2, "; %var% ++|-- )"))
|
||||||
{
|
{
|
||||||
// Take a look at the variable declaration
|
// Take a look at the variable declaration
|
||||||
|
|
Loading…
Reference in New Issue