Remove unneded deep copy, make reference const
This commit is contained in:
parent
d52e3c8eb7
commit
43a19dee8b
|
@ -570,11 +570,11 @@ static void eraseNotLocalArg(std::map<unsigned int, const Token*>& container, co
|
|||
}
|
||||
}
|
||||
|
||||
static void eraseMemberAssignments(const unsigned int varId, std::map<unsigned int, std::set<unsigned int> > &membervars, std::map<unsigned int, const Token*> &varAssignments)
|
||||
static void eraseMemberAssignments(const unsigned int varId, const std::map<unsigned int, std::set<unsigned int> > &membervars, std::map<unsigned int, const Token*> &varAssignments)
|
||||
{
|
||||
const std::map<unsigned int, std::set<unsigned int> >::const_iterator it = membervars.find(varId);
|
||||
if (it != membervars.end()) {
|
||||
const std::set<unsigned int> v = it->second;
|
||||
const std::set<unsigned int>& v = it->second;
|
||||
for (std::set<unsigned int>::const_iterator vit = v.begin(); vit != v.end(); ++vit) {
|
||||
varAssignments.erase(*vit);
|
||||
if (*vit != varId)
|
||||
|
|
Loading…
Reference in New Issue