mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Pull out the variable query.
This commit is contained in:
parent
11e7c5e813
commit
c85a1058f6
@ -134,13 +134,15 @@ void UnusedAssignEliminator::shortcutNestedLoop(ActiveStores const& _zeroRuns)
|
||||
// they will be joined later anyway.
|
||||
|
||||
for (auto& [variable, stores]: m_activeStores)
|
||||
{
|
||||
auto zeroIt = _zeroRuns.find(variable);
|
||||
for (auto& assignment: stores)
|
||||
{
|
||||
auto zeroIt = _zeroRuns.find(variable);
|
||||
if (zeroIt != _zeroRuns.end() && zeroIt->second.count(assignment))
|
||||
continue;
|
||||
m_usedStores.insert(assignment);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UnusedAssignEliminator::finalizeFunctionDefinition(FunctionDefinition const& _functionDefinition)
|
||||
|
Loading…
Reference in New Issue
Block a user