Skip to content

Commit 9b6d401

Browse files
Update tokenize.cpp
1 parent 92d96c5 commit 9b6d401

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

lib/tokenize.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3336,13 +3336,13 @@ bool Tokenizer::simplifyUsing()
33363336
tok1->deleteThis();
33373337
substitute = true;
33383338
}
3339-
// function pointer
33403339
} else if (fpArgList && fpQual && Token::Match(tok1->next(), "%name%")) {
3340+
// function pointer
33413341
TokenList::copyTokens(tok1->next(), fpArgList, usingEnd->previous());
33423342
Token* const copyEnd = TokenList::copyTokens(tok1, start, fpQual->link()->previous());
33433343
tok1->deleteThis();
33443344
Token* const rightPar = copyEnd->next()->insertToken(")");
3345-
Token::createMutualLinks(tok1->next(), rightPar);
3345+
Token::createMutualLinks(tok1->next(), rightPar);
33463346
substitute = true;
33473347
} else {
33483348
// add some qualification back if needed
@@ -6950,8 +6950,7 @@ void Tokenizer::simplifyFunctionParameters()
69506950
}
69516951

69526952
// Find the function e.g. foo( x ) or foo( x, y )
6953-
else if (Token::Match(tok, "%name% ( %name% [,)]") &&
6954-
!(tok->strAt(-1) == ":" || tok->strAt(-1) == "," || tok->strAt(-1) == "::")) {
6953+
else if (Token::Match(tok, "%name% ( %name% [,)]") && !Token::Match(tok->tokAt(-1), ":|,|::|=")) {
69556954
// We have found old style function, now we need to change it
69566955

69576956
// First step: Get list of argument names in parentheses

0 commit comments

Comments
 (0)