Skip to content

Commit e8b70d9

Browse files
committed
min_max
1 parent da37907 commit e8b70d9

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

include/phtree/common/b_plus_tree_base.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ class bpt_node_data : public bpt_node_base<KeyT, NInnerT, NLeafT> {
107107
[[nodiscard]] auto lower_bound(KeyT key) noexcept {
108108
// If this doesn´t compile, check #include <algorithm> !!!
109109
return std::lower_bound(data_.begin(), data_.end(), key, [](EntryT& left, const KeyT key) {
110-
// return left.first < key;
111110
return Compare{}(left.first, key);
112111
});
113112
}
@@ -397,7 +396,6 @@ class bpt_node_inner : public bpt_node_data<
397396
for (auto& e : this->data_) {
398397
assert(n == 0 || !Compare{}(e.first, prev_key));
399398
e.second->_check(count, this, prev_leaf, known_min, e.first);
400-
// assert(this->parent_ == nullptr || e.first <= known_max);
401399
assert(this->parent_ == nullptr || !Compare{}(known_max, e.first));
402400
prev_key = e.first;
403401
++n;
@@ -435,12 +433,10 @@ class bpt_node_inner : public bpt_node_data<
435433

436434
// update child1
437435
auto it = dest->lower_bound_node(key1_old, child1);
438-
// assert(key1_old >= key1_new && it != dest->data_.end());
439436
assert(!Compare{}(key1_old, key1_new) && it != dest->data_.end());
440437
it->first = key1_new;
441438

442439
if (dest == this && this->next_node_ != nullptr) {
443-
// assert(this->next_node_->data_.front().first >= key1_new);
444440
assert(!Compare{}(this->next_node_->data_.front().first, key1_new));
445441
}
446442
++it;

include/phtree/common/b_plus_tree_multimap.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ namespace phtree::bptree {
7575
*/
7676
template <typename KeyT, typename ValueT, typename Compare = std::less<KeyT>>
7777
class b_plus_tree_multimap {
78-
// static_assert(std::is_integral<KeyT>() && "Key type must be integer");
79-
// static_assert(std::is_unsigned<KeyT>() && "Key type must unsigned");
8078
static_assert(std::is_arithmetic<KeyT>() && "Key type must integral or floating point");
8179

8280
class bpt_node_leaf;
@@ -352,9 +350,7 @@ class b_plus_tree_multimap {
352350

353351
assert(prev_leaf == this->prev_node_);
354352
for (auto& e : this->data_) {
355-
// assert(count == 0 || e.first >= known_min);
356353
assert(count == 0 || !Compare{}(e.first, known_min));
357-
// assert(this->parent_ == nullptr || e.first <= known_max);
358354
assert(this->parent_ == nullptr || !Compare{}(known_max, e.first));
359355
++count;
360356
known_min = e.first;

0 commit comments

Comments
 (0)