Skip to content

Commit d918f76

Browse files
Ken-Patrickdanmar
authored andcommitted
Remove useless check introduced by 717aa82 (#2130)
I was confused by the naming in the forum entry (this/that). This would be a pointer, there's no point checking for it there.
1 parent d1c6cb9 commit d918f76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/checkclass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ void CheckClass::initializationListUsage()
950950
break;
951951
if (Token::Match(tok, "try|do {"))
952952
break;
953-
if (!Token::Match(tok, "%var% =") || tok->strAt(-1) == "*" || (tok->strAt(-1) == "." && tok->strAt(-2) != "this"))
953+
if (!Token::Match(tok, "%var% =") || tok->strAt(-1) == "*" || tok->strAt(-1) == ".")
954954
continue;
955955

956956
const Variable* var = tok->variable();

0 commit comments

Comments
 (0)