Lines Matching refs:__z
340 // Precondition: __root != nullptr && __z != nullptr.
342 // __z == __root or == a direct or indirect child of __root.
343 // Effects: unlinks __z from the tree rooted at __root, rebalancing as needed.
345 // nor any of its children refer to __z. end_node->__left_
349 __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
351 // __z will be removed from the tree. Client still needs to destruct/deallocate it
352 // __y is either __z, or if __z has two children, __tree_next(__z).
355 _NodePtr __y = (__z->__left_ == nullptr || __z->__right_ == nullptr) ?
356 __z : __tree_next(__z);
379 // If we didn't remove __z, do so now by splicing in __y for __z,
380 // but copy __z's color. This does not impact __x or __w.
381 if (__y != __z)
383 // __z->__left_ != nulptr but __z->__right_ might == __x == nullptr
384 __y->__parent_ = __z->__parent_;
385 if (__tree_is_left_child(__z))
389 __y->__left_ = __z->__left_;
391 __y->__right_ = __z->__right_;
394 __y->__is_black_ = __z->__is_black_;
395 if (__root == __z)