Tokenizer::simplifyGoto: Only simplify the last label in the function. If there are many labels in the same function and all labels are simplified, this function becomes very slow.
This commit is contained in:
parent
301e59cea0
commit
db4a28d60b
|
@ -7914,8 +7914,19 @@ void Tokenizer::simplifyGoto()
|
|||
}
|
||||
}
|
||||
|
||||
// goto the end of the function
|
||||
while (tok)
|
||||
{
|
||||
if (tok->str() == "{")
|
||||
tok = tok->link();
|
||||
else if (tok->str() == "}")
|
||||
break;
|
||||
tok = tok->next();
|
||||
}
|
||||
if (!tok)
|
||||
break;
|
||||
gotos.clear();
|
||||
tok = beginfunction;
|
||||
beginfunction = 0;
|
||||
indentlevel = 0;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue