Skip to content

Commit

Permalink
Turn off sanity check for iterators in debug build
Browse files Browse the repository at this point in the history
  • Loading branch information
frozenca committed Jul 23, 2022
1 parent a9edf86 commit adf3c33
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fc_btree.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ requires(Fanout >= 2 && FanoutLeaf >= 2) class BTreeBase {
}

bool verify() noexcept {
return !node_->parent_ || (index_ < node_->nkeys());
// Uncomment this line for testing
// assert(!node_->parent_ || (index_ < node_->nkeys()));
return true;
}

BTreeIterator &operator++() noexcept {
Expand Down Expand Up @@ -525,7 +527,7 @@ requires(Fanout >= 2 && FanoutLeaf >= 2) class BTreeBase {

[[nodiscard]] bool verify() const {
// Uncomment these lines for testing

// assert(begin_ == const_iterator_type(leftmost_leaf(root_.get()), 0));
// assert(verify(root_.get()));
return true;
Expand Down

0 comments on commit adf3c33

Please sign in to comment.