Skip to content

Commit

Permalink
Small improvement in Array::insert_btree_child()
Browse files Browse the repository at this point in the history
  • Loading branch information
kspangsege committed Sep 6, 2013
1 parent d1e87b3 commit 8815b51
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/tightdb/array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1715,9 +1715,8 @@ ref_type Array::insert_btree_child(Array& offsets, Array& refs, size_t orig_chil
TIGHTDB_ASSERT(insert_ndx <= node_size);
if (TIGHTDB_LIKELY(node_size < TIGHTDB_MAX_LIST_SIZE)) {
refs.insert(insert_ndx, new_sibling_ref);
offsets.set(orig_child_ndx, elem_ndx_offset + state.m_split_offset);
offsets.insert(insert_ndx, elem_ndx_offset + state.m_split_size);
offsets.adjust(insert_ndx + 1, 1);
offsets.insert(insert_ndx - 1, elem_ndx_offset + state.m_split_offset);
offsets.adjust(insert_ndx, 1);
return 0; // Parent node was not split
}

Expand Down

0 comments on commit 8815b51

Please sign in to comment.