Compare commits

...

3 Commits

1 changed files with 6 additions and 6 deletions

12
btree.h
View File

@ -574,9 +574,9 @@ class btree_node {
btree_node* child(int i) const { return fields_.children[i]; }
btree_node** mutable_child(int i) { return &fields_.children[i]; }
void set_child(int i, btree_node *c) {
*mutable_child(i) = c;
c->fields_.parent = this;
c->fields_.position = i;
reinterpret_cast<internal_fields*>(this)->children[i] = c;
reinterpret_cast<internal_fields*>(c)->parent = this;
reinterpret_cast<internal_fields*>(c)->position = i;
}
// Returns the position of the first value whose key is not less than k.
@ -862,8 +862,8 @@ class btree : public Params::key_compare {
typedef typename node_type::root_fields root_fields;
typedef typename Params::is_key_compare_to is_key_compare_to;
friend class btree_internal_locate_plain_compare;
friend class btree_internal_locate_compare_to;
friend struct btree_internal_locate_plain_compare;
friend struct btree_internal_locate_compare_to;
typedef typename if_<
is_key_compare_to::value,
btree_internal_locate_compare_to,
@ -927,7 +927,7 @@ class btree : public Params::key_compare {
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef typename Params::allocator_type allocator_type;
typedef typename allocator_type::template rebind<char>::other
typedef typename std::allocator_traits<allocator_type>::template rebind_alloc<char>
internal_allocator_type;
public: