From 7d0106b93af1a48fae84d03f828ea469965e7a4e Mon Sep 17 00:00:00 2001 From: chrchr Date: Tue, 11 Jul 2023 15:32:13 +0200 Subject: [PATCH] Fix --- lib/checkclass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index e26b01c1377..a89311da129 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -2469,7 +2469,7 @@ bool CheckClass::checkConstFunc(const Scope *scope, const Function *func, Member if (!end || !scope || !Token::simpleMatch(end->astParent(), ".")) return false; auto it = std::find_if(scope->functionList.begin(), scope->functionList.end(), [](const Function& f) { - return f.isConst() && (f.name() == "operator->" || f.name() == "operator->"); + return f.isConst() && (f.name() == "operator." || f.name() == "operator->"); }); if (it == scope->functionList.end() || !it->retType || !it->retType->classScope) return false;