Fixed Token::Match pattern. See also #5310

This commit is contained in:
Daniel Marjamäki 2014-01-05 23:02:07 +01:00
parent 4620284cbf
commit a98c66b048
1 changed files with 1 additions and 1 deletions

View File

@ -468,7 +468,7 @@ void CheckClass::initializeVarList(const Function &func, std::list<const Functio
}
}
}
} else if (level == 0 && Token::Match(ftok, "%var% {") && ftok->str() != "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)