Refactoring: Renamed class allocfunc to AllocFunc

This commit is contained in:
Daniel Marjamäki 2008-08-07 18:53:35 +00:00
parent bbd8c03369
commit 77c92a0fc8
1 changed files with 60 additions and 60 deletions

View File

@ -19,19 +19,19 @@
enum AllocType { No, Malloc, New, NewA }; enum AllocType { No, Malloc, New, NewA };
// Extra allocation.. // Extra allocation..
class allocfunc class AllocFunc
{ {
public: public:
const char *funcname; const char *funcname;
AllocType alloctype; AllocType alloctype;
allocfunc(const char f[], AllocType a) AllocFunc(const char f[], AllocType a)
{ {
funcname = f; funcname = f;
alloctype = a; alloctype = a;
} }
}; };
static std::list<allocfunc> listallocfunc; static std::list<AllocFunc> listallocfunc;
static AllocType GetAllocationType( const TOKEN *tok2 ) static AllocType GetAllocationType( const TOKEN *tok2 )
{ {
@ -70,7 +70,7 @@ static AllocType GetAllocationType( const TOKEN *tok2 )
return NewA; return NewA;
// Userdefined allocation function.. // Userdefined allocation function..
std::list<allocfunc>::const_iterator it = listallocfunc.begin(); std::list<AllocFunc>::const_iterator it = listallocfunc.begin();
while ( it != listallocfunc.end() ) while ( it != listallocfunc.end() )
{ {
if ( strcmp(tok2->str, it->funcname) == 0 ) if ( strcmp(tok2->str, it->funcname) == 0 )
@ -301,7 +301,7 @@ static void CheckMemoryLeak_CheckScope( const TOKEN *Tok1, const char varname[]
if ( funcname ) if ( funcname )
{ {
listallocfunc.push_back( allocfunc(funcname, Alloc) ); listallocfunc.push_back( AllocFunc(funcname, Alloc) );
} }
} }