Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a BoundedIterator class #8309

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Next round of shadow...
  • Loading branch information
mrambacher committed May 18, 2021
commit 8ae38139378b640626632bc617e9a0797b61400d
10 changes: 5 additions & 5 deletions util/bounded_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ class BoundedIterator : public Iterator {
// Otherwise Slice comparison is invoked.
int Compare(const Slice& a, const Slice& b) const;

BoundedIterator(Iterator* base, const Comparator* comp,
const Slice* lower_bound, const Slice* upper_bound)
BoundedIterator(Iterator* base, const Comparator* comp, const Slice* lower,
const Slice* upper)
: base_(base),
comparator_(comp),
lower_bound_(lower_bound),
upper_bound_(upper_bound),
lower_bound_(lower),
upper_bound_(upper),
in_bounds_(false) {}

public:
Expand All @@ -71,7 +71,7 @@ class BoundedIterator : public Iterator {
// If the input iterator already has a bound, the more restrictive of the
// input bounds or the iterator bounds are used.
static Iterator* Create(Iterator* base, const Comparator* comp,
const Slice* lower_bound, const Slice* upper_bound);
const Slice* lower, const Slice* upper);

~BoundedIterator() { delete base_; }

Expand Down