From adf3c3309f45a65010d767df674c232c12f5c00a Mon Sep 17 00:00:00 2001 From: frozenca Date: Sun, 24 Jul 2022 07:43:38 +0900 Subject: [PATCH] Turn off sanity check for iterators in debug build --- fc_btree.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fc_btree.h b/fc_btree.h index 99c440b..ba47577 100644 --- a/fc_btree.h +++ b/fc_btree.h @@ -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 { @@ -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;