Update declaration of memory safe assembly blocks (#5172)

Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
Hadrien Croubois
2024-08-29 23:07:17 +02:00
parent 40dd647022
commit 0f09ebad09
32 changed files with 91 additions and 182 deletions

View File

@ -212,8 +212,7 @@ library Heap {
*/
function clear(Uint256Heap storage self) internal {
Uint256HeapNode[] storage data = self.data;
/// @solidity memory-safe-assembly
assembly {
assembly ("memory-safe") {
sstore(data.slot, 0)
}
}
@ -479,8 +478,7 @@ library Heap {
*/
function clear(Uint208Heap storage self) internal {
Uint208HeapNode[] storage data = self.data;
/// @solidity memory-safe-assembly
assembly {
assembly ("memory-safe") {
sstore(data.slot, 0)
}
}