@@ -19,36 +19,15 @@ library BucketDLL {
1919
2020 /* INTERNAL */
2121
22- /// @notice Returns the address at the head of the `list`.
23- /// @param list The list from which to get the head.
24- /// @return The address of the head.
25- function getHead (List storage list ) internal view returns (address ) {
26- return list.accounts[address (0 )].next;
27- }
28-
29- /// @notice Returns the address at the tail of the `list`.
30- /// @param list The list from which to get the tail.
31- /// @return The address of the tail.
32- function getTail (List storage list ) internal view returns (address ) {
33- return list.accounts[address (0 )].prev;
34- }
35-
3622 /// @notice Returns the next id address from the current `id`.
23+ /// @dev Pass the address 0 to get the head of the list.
3724 /// @param list The list to search in.
3825 /// @param id The address of the current account.
3926 /// @return The address of the next account.
4027 function getNext (List storage list , address id ) internal view returns (address ) {
4128 return list.accounts[id].next;
4229 }
4330
44- /// @notice Returns the previous id address from the current `id`.
45- /// @param list The list to search in.
46- /// @param id The address of the current account.
47- /// @return The address of the previous account.
48- function getPrev (List storage list , address id ) internal view returns (address ) {
49- return list.accounts[id].prev;
50- }
51-
5231 /// @notice Removes an account of the `list`.
5332 /// @dev This function should not be called with `id` equal to address 0.
5433 /// @dev This function should not be called with an `_id` that is not in the list.
@@ -70,7 +49,7 @@ library BucketDLL {
7049
7150 /// @notice Inserts an account in the `list`.
7251 /// @dev This function should not be called with `id` equal to address 0.
73- /// @dev This function should not be called with an `_id ` that is already in the list.
52+ /// @dev This function should not be called with an `id ` that is already in the list.
7453 /// @param list The list to search in.
7554 /// @param id The address of the account.
7655 /// @param atHead Tells whether to insert at the head or at the tail of the list.
0 commit comments