{
enum maple_type type = mte_node_type(parent);
- unsigned char slot_cnt = mt_slots[type];
+ void **slots = ma_get_slots(mte_to_node(mas->node), type);
struct maple_enode *child;
- unsigned char slot;
+ unsigned char offset;
- for (slot = 0; slot < slot_cnt; slot++) {
- if (slot != 0 && slot < slot_cnt - 1 &&
- _mte_get_pivot(parent, slot, type) == 0)
+ for (offset = 0; offset < mt_slots[type]; offset++) {
+ child = slots[offset];
+ if (!child)
break;
-
- child = _mte_get_slot(parent, slot, type, mas->tree);
- if (child)
- mte_set_parent(child, parent, slot);
+ mte_set_parent(child, parent, offset);
}
}