mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #12414 from ethereum/fixWarnRef
Fix warning from Xcode 12.4 about a reference in `ranges::zip_view`
This commit is contained in:
commit
270793b0b2
@ -247,7 +247,7 @@ Stack createIdealLayout(Stack const& _operationOutput, Stack const& _post, Calla
|
|||||||
// before the operation, i.e. if PreviousSlot{2} is at a position at which _post contains VariableSlot{"tmp"},
|
// before the operation, i.e. if PreviousSlot{2} is at a position at which _post contains VariableSlot{"tmp"},
|
||||||
// then we want the variable tmp in the slot at offset 2 in the layout before the operation.
|
// then we want the variable tmp in the slot at offset 2 in the layout before the operation.
|
||||||
vector<optional<StackSlot>> idealLayout(_post.size(), nullopt);
|
vector<optional<StackSlot>> idealLayout(_post.size(), nullopt);
|
||||||
for (auto const& [slot, idealPosition]: ranges::zip_view(_post, layout))
|
for (auto&& [slot, idealPosition]: ranges::zip_view(_post, layout))
|
||||||
if (PreviousSlot* previousSlot = std::get_if<PreviousSlot>(&idealPosition))
|
if (PreviousSlot* previousSlot = std::get_if<PreviousSlot>(&idealPosition))
|
||||||
idealLayout.at(previousSlot->slot) = slot;
|
idealLayout.at(previousSlot->slot) = slot;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user