From d918f76a0d90b3c2311cf1f99a976f84a3003b24 Mon Sep 17 00:00:00 2001 From: Ken-Patrick Date: Sun, 1 Sep 2019 09:53:45 +0200 Subject: [PATCH] Remove useless check introduced by 717aa826d8c98dab533b7c2166eb412b1422b14d (#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. --- lib/checkclass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index 674deb7c2..a6b24bdd7 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -950,7 +950,7 @@ void CheckClass::initializationListUsage() break; if (Token::Match(tok, "try|do {")) break; - if (!Token::Match(tok, "%var% =") || tok->strAt(-1) == "*" || (tok->strAt(-1) == "." && tok->strAt(-2) != "this")) + if (!Token::Match(tok, "%var% =") || tok->strAt(-1) == "*" || tok->strAt(-1) == ".") continue; const Variable* var = tok->variable();