Skip to content

Commit

Permalink
Fix documentation of private function _upperLookupBinary in Checkpo…
Browse files Browse the repository at this point in the history
…ints.sol (#5128)

Co-authored-by: cairo <[email protected]>
  • Loading branch information
Amxx and cairoeth authored Jul 29, 2024
1 parent 659f306 commit 9d6a0cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
24 changes: 12 additions & 12 deletions contracts/utils/structs/Checkpoints.sol
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ library Checkpoints {
}

/**
* @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high`
* @dev Return the index of the first (oldest) checkpoint with key strictly bigger than the search key, or `high`
* if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive
* `high`.
*
Expand All @@ -178,9 +178,9 @@ library Checkpoints {
}

/**
* @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or
* `high` if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and
* exclusive `high`.
* @dev Return the index of the first (oldest) checkpoint with key greater or equal than the search key, or `high`
* if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive
* `high`.
*
* WARNING: `high` should not be greater than the array's length.
*/
Expand Down Expand Up @@ -349,7 +349,7 @@ library Checkpoints {
}

/**
* @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high`
* @dev Return the index of the first (oldest) checkpoint with key strictly bigger than the search key, or `high`
* if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive
* `high`.
*
Expand All @@ -373,9 +373,9 @@ library Checkpoints {
}

/**
* @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or
* `high` if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and
* exclusive `high`.
* @dev Return the index of the first (oldest) checkpoint with key greater or equal than the search key, or `high`
* if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive
* `high`.
*
* WARNING: `high` should not be greater than the array's length.
*/
Expand Down Expand Up @@ -544,7 +544,7 @@ library Checkpoints {
}

/**
* @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high`
* @dev Return the index of the first (oldest) checkpoint with key strictly bigger than the search key, or `high`
* if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive
* `high`.
*
Expand All @@ -568,9 +568,9 @@ library Checkpoints {
}

/**
* @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or
* `high` if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and
* exclusive `high`.
* @dev Return the index of the first (oldest) checkpoint with key greater or equal than the search key, or `high`
* if there is none. `low` and `high` define a section where to do the search, with inclusive `low` and exclusive
* `high`.
*
* WARNING: `high` should not be greater than the array's length.
*/
Expand Down
8 changes: 4 additions & 4 deletions scripts/generate/templates/Checkpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function _insert(${opts.checkpointTypeName}[] storage self, ${opts.keyTypeName}
}
/**
* @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or \`high\`
* @dev Return the index of the first (oldest) checkpoint with key strictly bigger than the search key, or \`high\`
* if there is none. \`low\` and \`high\` define a section where to do the search, with inclusive \`low\` and exclusive
* \`high\`.
*
Expand All @@ -183,9 +183,9 @@ function _upperBinaryLookup(
}
/**
* @dev Return the index of the first (oldest) checkpoint with key is greater or equal than the search key, or
* \`high\` if there is none. \`low\` and \`high\` define a section where to do the search, with inclusive \`low\` and
* exclusive \`high\`.
* @dev Return the index of the first (oldest) checkpoint with key greater or equal than the search key, or \`high\`
* if there is none. \`low\` and \`high\` define a section where to do the search, with inclusive \`low\` and exclusive
* \`high\`.
*
* WARNING: \`high\` should not be greater than the array's length.
*/
Expand Down

0 comments on commit 9d6a0cc

Please sign in to comment.