remove unneeded extra constructions now that pool allocation is fixed
This commit is contained in:
parent
f669f13998
commit
eebb48f5fc
@ -426,12 +426,7 @@ TSymbolTableLevel* TSymbolTableLevel::clone() const
|
|||||||
symTableLevel->thisLevel = thisLevel;
|
symTableLevel->thisLevel = thisLevel;
|
||||||
symTableLevel->retargetedSymbols.clear();
|
symTableLevel->retargetedSymbols.clear();
|
||||||
for (auto &s : retargetedSymbols) {
|
for (auto &s : retargetedSymbols) {
|
||||||
// Extra constructions to make sure they use the correct allocator pool
|
symTableLevel->retargetedSymbols.push_back({s.first, s.second});
|
||||||
TString newFrom;
|
|
||||||
newFrom = s.first;
|
|
||||||
TString newTo;
|
|
||||||
newTo = s.second;
|
|
||||||
symTableLevel->retargetedSymbols.push_back({std::move(newFrom), std::move(newTo)});
|
|
||||||
}
|
}
|
||||||
std::vector<bool> containerCopied(anonId, false);
|
std::vector<bool> containerCopied(anonId, false);
|
||||||
tLevel::const_iterator iter;
|
tLevel::const_iterator iter;
|
||||||
@ -462,11 +457,7 @@ TSymbolTableLevel* TSymbolTableLevel::clone() const
|
|||||||
TSymbol* sym = symTableLevel->find(s.second);
|
TSymbol* sym = symTableLevel->find(s.second);
|
||||||
if (!sym)
|
if (!sym)
|
||||||
continue;
|
continue;
|
||||||
|
symTableLevel->insert(s.first, sym);
|
||||||
// Need to declare and assign so newS is using the correct pool allocator
|
|
||||||
TString newS;
|
|
||||||
newS = s.first;
|
|
||||||
symTableLevel->insert(newS, sym);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return symTableLevel;
|
return symTableLevel;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user