FastLED 3.9.15
Loading...
Searching...
No Matches

◆ rotateRight()

template<typename T, typename Compare = less<T>, typename Allocator = allocator_slab<char>>
void fl::RedBlackTree< T, Compare, Allocator >::rotateRight ( RBNode * x)
inlineprivate

Definition at line 85 of file rbtree.h.

85 {
86 RBNode* y = x->left;
87 x->left = y->right;
88 if (y->right != nullptr) {
89 y->right->parent = x;
90 }
91 y->parent = x->parent;
92 if (x->parent == nullptr) {
93 mRoot = y;
94 } else if (x == x->parent->right) {
95 x->parent->right = y;
96 } else {
97 x->parent->left = y;
98 }
99 y->right = x;
100 x->parent = y;
101 }
RBNode * mRoot
Definition rbtree.h:61

Referenced by fl::RedBlackTree< value_type, PairCompare, Allocator >::deleteFixup(), and fl::RedBlackTree< value_type, PairCompare, Allocator >::insertFixup().

+ Here is the caller graph for this function: