Refactoring: static variable in CheckMemoryLeak is now a private member of the class.
This commit is contained in:
parent
ce08224547
commit
231e753289
|
@ -71,24 +71,6 @@ bool CheckMemoryLeakClass::isclass( const std::string &typestr )
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Extra allocation..
|
|
||||||
class AllocFunc
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
const char *funcname;
|
|
||||||
AllocType alloctype;
|
|
||||||
|
|
||||||
AllocFunc(const char f[], AllocType a)
|
|
||||||
{
|
|
||||||
funcname = f;
|
|
||||||
alloctype = a;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
static std::list<AllocFunc> listallocfunc;
|
|
||||||
|
|
||||||
AllocType CheckMemoryLeakClass::GetAllocationType( const TOKEN *tok2 )
|
AllocType CheckMemoryLeakClass::GetAllocationType( const TOKEN *tok2 )
|
||||||
{
|
{
|
||||||
// What we may have...
|
// What we may have...
|
||||||
|
|
|
@ -40,6 +40,20 @@ public:
|
||||||
void CheckMemoryLeak();
|
void CheckMemoryLeak();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
// Extra allocation..
|
||||||
|
class AllocFunc
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
const char *funcname;
|
||||||
|
AllocType alloctype;
|
||||||
|
|
||||||
|
AllocFunc(const char f[], AllocType a)
|
||||||
|
{
|
||||||
|
funcname = f;
|
||||||
|
alloctype = a;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void CheckMemoryLeak_ClassMembers_Variable( const std::vector<const char *> &classname, const char varname[] );
|
void CheckMemoryLeak_ClassMembers_Variable( const std::vector<const char *> &classname, const char varname[] );
|
||||||
void CheckMemoryLeak_ClassMembers_ParseClass( const TOKEN *tok1, std::vector<const char *> &classname );
|
void CheckMemoryLeak_ClassMembers_ParseClass( const TOKEN *tok1, std::vector<const char *> &classname );
|
||||||
void CheckMemoryLeak_ClassMembers();
|
void CheckMemoryLeak_ClassMembers();
|
||||||
|
@ -60,6 +74,7 @@ private:
|
||||||
|
|
||||||
Tokenizer *_tokenizer;
|
Tokenizer *_tokenizer;
|
||||||
Settings _settings;
|
Settings _settings;
|
||||||
|
std::list<AllocFunc> listallocfunc;
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue