Fix Cppcheck performance warning stlFindInsert properly
This commit is contained in:
parent
079255d913
commit
28e33ef0b9
|
@ -197,9 +197,9 @@ void Settings::loadSummaries()
|
||||||
// noreturn..
|
// noreturn..
|
||||||
if (line.find(" noreturn:[") != std::string::npos || line.find(" call:[") != std::string::npos)
|
if (line.find(" noreturn:[") != std::string::npos || line.find(" call:[") != std::string::npos)
|
||||||
summaryNoreturn[functionName] = true;
|
summaryNoreturn[functionName] = true;
|
||||||
else if (summaryNoreturn.find(functionName) == summaryNoreturn.end())
|
else
|
||||||
// cppcheck-suppress stlFindInsert
|
// If there is a value for function already keep it, otherwise insert false
|
||||||
summaryNoreturn[functionName] = false;
|
summaryNoreturn.emplace(std::pair<std::string,bool>(functionName, false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue