Apply patch from #1066 (Speed up cppcheck)

http://sourceforge.net/apps/trac/cppcheck/ticket/1066
This commit is contained in:
Reijo Tomperi 2009-12-08 23:12:49 +02:00
parent db30c5b0d2
commit d08d1deab1
1 changed files with 5 additions and 1 deletions

View File

@ -3539,7 +3539,8 @@ bool Tokenizer::simplifyKnownVariables()
// parse the block of code.. // parse the block of code..
int indentlevel = 0; int indentlevel = 0;
for (Token *tok2 = tok; tok2; tok2 = tok2->next()) Token *tok2 = tok;
for (; tok2; tok2 = tok2->next())
{ {
if (tok2->str() == "{") if (tok2->str() == "{")
@ -3696,6 +3697,9 @@ bool Tokenizer::simplifyKnownVariables()
} }
} }
} }
if (tok2)
tok = tok2->previous();
} }
return ret; return ret;