Rename _alloc

This commit is contained in:
Daniel Marjamäki 2018-06-17 16:32:08 +02:00
parent 2f23757c74
commit fb8e970419
2 changed files with 7 additions and 7 deletions

View File

@ -178,7 +178,7 @@ Library::Error Library::load(const tinyxml2::XMLDocument &doc)
temp.arg = atoi(arg); temp.arg = atoi(arg);
else else
temp.arg = -1; temp.arg = -1;
_alloc[memorynode->GetText()] = temp; mAlloc[memorynode->GetText()] = temp;
} else if (memorynodename == "dealloc") { } else if (memorynodename == "dealloc") {
AllocFunc temp; AllocFunc temp;
temp.groupId = allocationId; temp.groupId = allocationId;
@ -825,7 +825,7 @@ bool Library::isuninitargbad(const Token *ftok, int argnr) const
const Library::AllocFunc* Library::alloc(const Token *tok) const const Library::AllocFunc* Library::alloc(const Token *tok) const
{ {
const std::string funcname = getFunctionName(tok); const std::string funcname = getFunctionName(tok);
return isNotLibraryFunction(tok) && functions.find(funcname) != functions.end() ? nullptr : getAllocDealloc(_alloc, funcname); return isNotLibraryFunction(tok) && functions.find(funcname) != functions.end() ? nullptr : getAllocDealloc(mAlloc, funcname);
} }
/** get deallocation info for function */ /** get deallocation info for function */

View File

@ -89,7 +89,7 @@ public:
/** get allocation info for function by name (deprecated, use other alloc) */ /** get allocation info for function by name (deprecated, use other alloc) */
const AllocFunc* alloc(const char name[]) const { const AllocFunc* alloc(const char name[]) const {
return getAllocDealloc(_alloc, name); return getAllocDealloc(mAlloc, name);
} }
/** get deallocation info for function by name (deprecated, use other alloc) */ /** get deallocation info for function by name (deprecated, use other alloc) */
@ -99,7 +99,7 @@ public:
/** get allocation id for function by name (deprecated, use other alloc) */ /** get allocation id for function by name (deprecated, use other alloc) */
int allocId(const char name[]) const { int allocId(const char name[]) const {
const AllocFunc* af = getAllocDealloc(_alloc, name); const AllocFunc* af = getAllocDealloc(mAlloc, name);
return af ? af->groupId : 0; return af ? af->groupId : 0;
} }
@ -111,8 +111,8 @@ public:
/** set allocation id for function */ /** set allocation id for function */
void setalloc(const std::string &functionname, int id, int arg) { void setalloc(const std::string &functionname, int id, int arg) {
_alloc[functionname].groupId = id; mAlloc[functionname].groupId = id;
_alloc[functionname].arg = arg; mAlloc[functionname].arg = arg;
} }
void setdealloc(const std::string &functionname, int id, int arg) { void setdealloc(const std::string &functionname, int id, int arg) {
@ -496,7 +496,7 @@ private:
}; };
int allocid; int allocid;
std::set<std::string> mFiles; std::set<std::string> mFiles;
std::map<std::string, AllocFunc> _alloc; // allocation functions std::map<std::string, AllocFunc> mAlloc; // allocation functions
std::map<std::string, AllocFunc> _dealloc; // deallocation functions std::map<std::string, AllocFunc> _dealloc; // deallocation functions
std::map<std::string, bool> _noreturn; // is function noreturn? std::map<std::string, bool> _noreturn; // is function noreturn?
std::map<std::string, std::string> _returnValue; std::map<std::string, std::string> _returnValue;