Skip to content

Commit

Permalink
Merge pull request #12 from OlympusDAO/yield-repo
Browse files Browse the repository at this point in the history
Yield Repurchase Facility
  • Loading branch information
0xJem authored Nov 13, 2024
2 parents 35b572a + dc5023b commit 2afc390
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/test/lib/solady/DynamicBufferLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@ library DynamicBufferLib {
// and another extra word as a safety word (giving a total of 0x40 bytes).
// Without the safety word, the data at the next free memory word can be overwritten,
// because the backwards copying can exceed the buffer space used for storage.
for {

} iszero(lt(newBufferDataLength, capacity)) {

} {
for {} iszero(lt(newBufferDataLength, capacity)) {} {
// Approximately double the memory with a heuristic,
// ensuring more than enough space for the combined data,
// rounding up to the next multiple of 32.
Expand All @@ -67,9 +63,7 @@ library DynamicBufferLib {
// Copy `bufferData` one word at a time, backwards.
for {
let o := and(add(bufferDataLength, 32), w)
} 1 {

} {
} 1 {} {
mstore(add(newBufferData, o), mload(add(bufferData, o)))
o := add(o, w) // `sub(o, 0x20)`.
if iszero(o) {
Expand All @@ -93,9 +87,7 @@ library DynamicBufferLib {
// Copy `data` one word at a time, backwards.
for {
let o := and(add(mload(data), 32), w)
} 1 {

} {
} 1 {} {
mstore(add(output, o), mload(add(data, o)))
o := add(o, w) // `sub(o, 0x20)`.
if iszero(o) {
Expand Down

0 comments on commit 2afc390

Please sign in to comment.