Refactoring: Renamed class allocfunc to AllocFunc
This commit is contained in:
parent
bbd8c03369
commit
77c92a0fc8
|
@ -19,19 +19,19 @@
|
|||
enum AllocType { No, Malloc, New, NewA };
|
||||
|
||||
// Extra allocation..
|
||||
class allocfunc
|
||||
class AllocFunc
|
||||
{
|
||||
public:
|
||||
const char *funcname;
|
||||
AllocType alloctype;
|
||||
|
||||
allocfunc(const char f[], AllocType a)
|
||||
AllocFunc(const char f[], AllocType a)
|
||||
{
|
||||
funcname = f;
|
||||
alloctype = a;
|
||||
}
|
||||
};
|
||||
static std::list<allocfunc> listallocfunc;
|
||||
static std::list<AllocFunc> listallocfunc;
|
||||
|
||||
static AllocType GetAllocationType( const TOKEN *tok2 )
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ static AllocType GetAllocationType( const TOKEN *tok2 )
|
|||
return NewA;
|
||||
|
||||
// Userdefined allocation function..
|
||||
std::list<allocfunc>::const_iterator it = listallocfunc.begin();
|
||||
std::list<AllocFunc>::const_iterator it = listallocfunc.begin();
|
||||
while ( it != listallocfunc.end() )
|
||||
{
|
||||
if ( strcmp(tok2->str, it->funcname) == 0 )
|
||||
|
@ -301,7 +301,7 @@ static void CheckMemoryLeak_CheckScope( const TOKEN *Tok1, const char varname[]
|
|||
|
||||
if ( funcname )
|
||||
{
|
||||
listallocfunc.push_back( allocfunc(funcname, Alloc) );
|
||||
listallocfunc.push_back( AllocFunc(funcname, Alloc) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue