Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx authored Jun 9, 2023
1 parent 02d57d1 commit 686e4f9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions contracts/utils/Arrays.sol
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,12 @@ library Arrays {
}

function unsafeMemoryAccess(uint256[] memory arr, uint256 pos) internal pure returns (uint256 res) {
/// @solidity memory-safe-assembly
assembly {
res := mload(add(add(arr, 0x20), mul(pos, 0x20)))
}
}

function unsafeMemoryAccess(address[] memory arr, uint256 pos) internal pure returns (address res) {
/// @solidity memory-safe-assembly
assembly {
res := mload(add(add(arr, 0x20), mul(pos, 0x20)))
}
Expand Down

0 comments on commit 686e4f9

Please sign in to comment.