Skip to content

Commit

Permalink
Rename copyWords to copy for better formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Vectorized committed Dec 28, 2024
1 parent 689c5bd commit 4748249
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
7 changes: 2 additions & 5 deletions src/DN404.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1654,7 +1654,7 @@ abstract contract DN404 {
if n {
result := mload(0x40)
mstore(result, n)
function copyWords(dst_, src_, n_) -> _end {
function copy(dst_, src_, n_) -> _end {
_end := add(dst_, shl(5, n_))
if n_ {
for { let d_ := sub(src_, dst_) } 1 {} {
Expand All @@ -1664,10 +1664,7 @@ abstract contract DN404 {
}
}
}
mstore(
0x40,
copyWords(copyWords(add(result, 0x20), add(a, 0x20), aN), add(b, 0x20), bN)
)
mstore(0x40, copy(copy(add(result, 0x20), add(a, 0x20), aN), add(b, 0x20), bN))
}
}
}
Expand Down
7 changes: 2 additions & 5 deletions src/DN420.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1589,7 +1589,7 @@ abstract contract DN420 {
if n {
result := mload(0x40)
mstore(result, n)
function copyWords(dst_, src_, n_) -> _end {
function copy(dst_, src_, n_) -> _end {
_end := add(dst_, shl(5, n_))
if n_ {
for { let d_ := sub(src_, dst_) } 1 {} {
Expand All @@ -1599,10 +1599,7 @@ abstract contract DN420 {
}
}
}
mstore(
0x40,
copyWords(copyWords(add(result, 0x20), add(a, 0x20), aN), add(b, 0x20), bN)
)
mstore(0x40, copy(copy(add(result, 0x20), add(a, 0x20), aN), add(b, 0x20), bN))
}
}
}
Expand Down
7 changes: 2 additions & 5 deletions test/ArrayOps.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ contract ArrayOpsTest is SoladyTest {
if n {
result := mload(0x40)
mstore(result, n)
function copyWords(dst_, src_, n_) -> _end {
function copy(dst_, src_, n_) -> _end {
_end := add(dst_, shl(5, n_))
if n_ {
for { let d_ := sub(src_, dst_) } 1 {} {
Expand All @@ -62,10 +62,7 @@ contract ArrayOpsTest is SoladyTest {
}
}
}
mstore(
0x40,
copyWords(copyWords(add(result, 0x20), add(a, 0x20), aN), add(b, 0x20), bN)
)
mstore(0x40, copy(copy(add(result, 0x20), add(a, 0x20), aN), add(b, 0x20), bN))
}
}
}
Expand Down

0 comments on commit 4748249

Please sign in to comment.