Omit repeated search when no insertion occurs

This commit is contained in:
Dmitry-Me 2017-09-06 18:02:27 +03:00
parent 66524ef645
commit 68f6cad2aa
1 changed files with 1 additions and 1 deletions

View File

@ -1237,9 +1237,9 @@ void SymbolDatabase::fixVarId(VarIdMap & varIds, const Token * vartok, Token * m
if (membertok->varId() == 0) {
varId->second.insert(std::make_pair(membervar->nameToken()->varId(), const_cast<Tokenizer *>(_tokenizer)->newVarId()));
_variableList.push_back(membervar);
memberId = varId->second.find(membervar->nameToken()->varId());
} else
_variableList[membertok->varId()] = membervar;
memberId = varId->second.find(membervar->nameToken()->varId());
}
if (membertok->varId() == 0)
membertok->varId(memberId->second);