mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-28 15:58:07 +00:00
refactor: Unify upperBound and lowerBound into boundHelper (#7943)
Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com> Co-authored-by: vlntb <13349202+vlntb@users.noreply.github.com>
This commit is contained in:
@@ -592,6 +592,20 @@ private:
|
||||
SHAMapLeafNode*
|
||||
belowHelper(NodePathStack& stack, BelowDirection direction) const;
|
||||
|
||||
/**
|
||||
* Returns the nearest item strictly past `id`, in the given direction.
|
||||
*
|
||||
* Walks back up the path to `id`. At each inner node the branches beyond the one `id` takes
|
||||
* hold the candidates, so the first non-empty one is the closest and the extreme leaf below
|
||||
* it is the answer.
|
||||
*
|
||||
* @param id The key to search from, which need not be in the map.
|
||||
* @param direction First to search upwards from `id`, Last to search downwards.
|
||||
* @return An iterator to the item found, or end() if no item lies on that side of `id`.
|
||||
*/
|
||||
ConstIterator
|
||||
boundHelper(uint256 const& id, BelowDirection direction) const;
|
||||
|
||||
// Simple descent
|
||||
// Get a child of the specified node
|
||||
SHAMapTreeNode*
|
||||
|
||||
Reference in New Issue
Block a user