Optimisation: small optimisation of CheckClass::privateFunctions
This commit is contained in:
parent
d0acc16506
commit
21bf58f1ec
|
@ -1318,15 +1318,17 @@ void CheckClass::privateFunctions()
|
||||||
inclass = false;
|
inclass = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Token::Match(ftok, ("class " + classname + " :|{").c_str()))
|
else if (ftok->str() == "class" &&
|
||||||
|
ftok->next()->str() == classname &&
|
||||||
|
Token::Match(ftok->tokAt(2), ":|{"))
|
||||||
{
|
{
|
||||||
indent_level = 0;
|
indent_level = 0;
|
||||||
inclass = true;
|
inclass = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check member class functions to see what functions are used..
|
// Check member class functions to see what functions are used..
|
||||||
if ((inclass && indent_level == 1 && Token::Match(ftok, "%var% (")) ||
|
else if ((inclass && indent_level == 1 && Token::Match(ftok, "%var% (")) ||
|
||||||
(Token::Match(ftok, (classname + " :: ~| %var% (").c_str())))
|
(ftok->str() == classname && Token::Match(ftok->next(), ":: ~| %var% (")))
|
||||||
{
|
{
|
||||||
while (ftok && ftok->str() != ")")
|
while (ftok && ftok->str() != ")")
|
||||||
ftok = ftok->next();
|
ftok = ftok->next();
|
||||||
|
|
Loading…
Reference in New Issue