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

◆ findNode()

template<typename T, typename Compare = less<T>, typename Allocator = allocator_slab<char>>
Node * fl::RedBlackTree< T, Compare, Allocator >::findNode ( const value_type & value) const
inlineprivate

Definition at line 220 of file rbtree.h.

220 {
221 Node* current = root_;
222 while (current != nullptr) {
223 if (comp_(value, current->data)) {
224 current = current->left;
225 } else if (comp_(current->data, value)) {
226 current = current->right;
227 } else {
228 return current;
229 }
230 }
231 return nullptr;
232 }
Compare comp_
Definition rbtree.h:56
Node * root_
Definition rbtree.h:54

Referenced by fl::RedBlackTree< value_type, PairCompare, Allocator >::contains(), fl::RedBlackTree< value_type, PairCompare, Allocator >::count(), fl::RedBlackTree< value_type, PairCompare, Allocator >::erase(), fl::RedBlackTree< value_type, PairCompare, Allocator >::find(), and fl::RedBlackTree< value_type, PairCompare, Allocator >::find().

+ Here is the caller graph for this function: