Avoid recomputing loop range end
This commit is contained in:
parent
db787369b9
commit
288ee96cc7
|
@ -159,7 +159,8 @@ void CheckSizeof::checkSizeofForPointerSize()
|
|||
tokSize = tokSize->nextArgument();
|
||||
|
||||
if (tokFunc && tokSize) {
|
||||
for (const Token* tok2 = tokSize; tok2 != tokFunc->linkAt(1); tok2 = tok2->next()) {
|
||||
const Token * const paramsListEndTok = tokFunc->linkAt(1);
|
||||
for (const Token* tok2 = tokSize; tok2 != paramsListEndTok; tok2 = tok2->next()) {
|
||||
if (Token::simpleMatch(tok2, "/ sizeof")) {
|
||||
// Allow division with sizeof(char)
|
||||
if (Token::simpleMatch(tok2->next(), "sizeof (")) {
|
||||
|
|
Loading…
Reference in New Issue