From a98c66b048c8e0871a04e075b71a4757cee3b9bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 5 Jan 2014 23:02:07 +0100 Subject: [PATCH] Fixed Token::Match pattern. See also #5310 --- lib/checkclass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index 8abfa8bb0..0283f81b2 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -468,7 +468,7 @@ void CheckClass::initializeVarList(const Function &func, std::liststr() != "const" && Token::Match(ftok->next()->link()->next(), ",|{|%type%")) { + } else if (level == 0 && Token::Match(ftok, "%var% {") && ftok->str() != "const" && Token::Match(ftok->next()->link()->next(), "%type%|,|{")) { initVar(ftok->str(), scope, usage); ftok = ftok->linkAt(1); } else if (level != 0 && Token::Match(ftok, "%var% =")) // assignment in the initializer: var(value = x)