Skip to content

Commit fefb2ac

Browse files
Update checkother.cpp
1 parent 9becbb6 commit fefb2ac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/checkother.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4043,7 +4043,7 @@ void CheckOtherImpl::checkFuncArgNamesDifferent()
40434043
definitions[j] = variable->nameToken();
40444044
}
40454045
// get the declaration (search for first token with varId)
4046-
while (decl && !Token::Match(decl, ",|)|;")) {
4046+
while (decl && !Token::Match(decl, "[,;]")) {
40474047
// skip everything after the assignment because
40484048
// it could also have a varId or be the first
40494049
// token with a varId if there is no name token
@@ -4052,7 +4052,7 @@ void CheckOtherImpl::checkFuncArgNamesDifferent()
40524052
break;
40534053
}
40544054
// skip over templates and arrays
4055-
if (decl->link() && decl->str() != "(")
4055+
if (decl->link() && !Token::Match(decl, "[()]"))
40564056
decl = decl->link();
40574057
else if (decl->varId())
40584058
declarations[j] = decl;

0 commit comments

Comments
 (0)