Refactor lib/checkleakautovar.cpp
This commit is contained in:
parent
c367fc9f09
commit
94048d93f6
|
@ -53,10 +53,10 @@ static const CWE CWE415(415U);
|
|||
void VarInfo::print()
|
||||
{
|
||||
std::cout << "size=" << alloctype.size() << std::endl;
|
||||
std::map<unsigned int, AllocInfo>::const_iterator it;
|
||||
for (it = alloctype.begin(); it != alloctype.end(); ++it) {
|
||||
for (std::map<unsigned int, AllocInfo>::const_iterator it = alloctype.begin(); it != alloctype.end(); ++it) {
|
||||
std::string strusage;
|
||||
std::map<unsigned int, std::string>::const_iterator use = possibleUsage.find(it->first);
|
||||
const std::map<unsigned int, std::string>::const_iterator use =
|
||||
possibleUsage.find(it->first);
|
||||
if (use != possibleUsage.end())
|
||||
strusage = use->second;
|
||||
|
||||
|
@ -88,8 +88,7 @@ void VarInfo::print()
|
|||
void VarInfo::possibleUsageAll(const std::string &functionName)
|
||||
{
|
||||
possibleUsage.clear();
|
||||
std::map<unsigned int, AllocInfo>::const_iterator it;
|
||||
for (it = alloctype.begin(); it != alloctype.end(); ++it)
|
||||
for (std::map<unsigned int, AllocInfo>::const_iterator it = alloctype.begin(); it != alloctype.end(); ++it)
|
||||
possibleUsage[it->first] = functionName;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue