mast->l->min = mast->orig_l->min;
mab_mas_cp(mast->bn, 0, split, mast->l, true);
- if (split == mast->bn->b_end) {
+ if (split == mast->bn->b_end)
mast->l->max = mast->orig_r->max;
- }
if (middle) {
mab_mas_cp(mast->bn, 1 + split, mid_split, mast->m, true);
mast->m->min = mast->bn->pivot[split] + 1;
- mast->m->max = mast->bn->pivot[mid_split];
split = mid_split;
}
+ mast->r->max = mast->orig_r->max;
if (right) {
- mab_mas_cp(mast->bn, 1 + split, mast->bn->b_end, mast->r, true);
+ mab_mas_cp(mast->bn, 1 + split, mast->bn->b_end, mast->r, false);
mast->r->min = mast->bn->pivot[split] + 1;
- } else {
- mast->r->max = mast->l->max;
}
}