Fixed ticket 134 (memory leak not detected) caused by wrong checking if code is inside class function or not
This commit is contained in:
parent
cd54a0ed3b
commit
c7c13ce3c1
|
@ -1345,15 +1345,15 @@ void CheckMemoryLeakClass::CheckMemoryLeak_InFunction()
|
|||
else if (tok->str() == "}")
|
||||
--indentlevel;
|
||||
|
||||
if (tok->str() == "::")
|
||||
classmember = true;
|
||||
|
||||
// In function..
|
||||
if (indentlevel == 0)
|
||||
{
|
||||
if (Token::Match(tok, ") {"))
|
||||
infunc = true;
|
||||
|
||||
else if (tok->str() == "::")
|
||||
classmember = true;
|
||||
|
||||
else if (Token::Match(tok, "[;}]"))
|
||||
infunc = classmember = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue