Fixed some simple errors in some old commits.
This commit is contained in:
parent
af23a9dcbb
commit
742858b67c
|
@ -4968,7 +4968,7 @@ void Tokenizer::simplifyDeadCode()
|
||||||
break;
|
break;
|
||||||
--indentlevel1;
|
--indentlevel1;
|
||||||
}
|
}
|
||||||
else if (Token::Match(tok2, "%var% : ;") && !Token::Match(tok2, "case!default"))
|
else if (Token::Match(tok2, "%var% : ;") && !Token::Match(tok2, "case|default"))
|
||||||
{
|
{
|
||||||
indentlabel = indentlevel1;
|
indentlabel = indentlevel1;
|
||||||
break;
|
break;
|
||||||
|
@ -10004,7 +10004,7 @@ void Tokenizer::simplifyWhile0()
|
||||||
// for (0) - not banal, ticket #3140
|
// for (0) - not banal, ticket #3140
|
||||||
const bool for0((Token::Match(tok, "for ( %var% = %num% ; %var% < %num% ;") &&
|
const bool for0((Token::Match(tok, "for ( %var% = %num% ; %var% < %num% ;") &&
|
||||||
tok->strAt(2) == tok->strAt(6) && tok->strAt(4) == tok->strAt(8)) ||
|
tok->strAt(2) == tok->strAt(6) && tok->strAt(4) == tok->strAt(8)) ||
|
||||||
(Token::Match(tok->tokAt(2), "%type% %var% = %num% ; %var% < %num% ;") &&
|
(Token::Match(tok, "for ( %type% %var% = %num% ; %var% < %num% ;") &&
|
||||||
tok->strAt(3) == tok->strAt(7) && tok->strAt(5) == tok->strAt(9)));
|
tok->strAt(3) == tok->strAt(7) && tok->strAt(5) == tok->strAt(9)));
|
||||||
|
|
||||||
if (!while0 && !for0)
|
if (!while0 && !for0)
|
||||||
|
|
Loading…
Reference in New Issue