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

◆ push_heap() [2/2]

template<typename Iterator, typename Compare>
void fl::push_heap ( Iterator first,
Iterator last,
Compare comp )

Definition at line 38 of file priority_queue.h.

38 {
39 auto pos = last - 1;
40 auto parent = first + ((pos - first) - 1) / 2;
41
42 while (pos > first && comp(*parent, *pos)) {
43 auto tmp = *parent;
44 *parent = *pos;
45 *pos = tmp;
46
47 pos = parent;
48 parent = first + ((pos - first) - 1) / 2;
49 }
50}
uint8_t pos
Definition Blur.ino:11

References pos.

Referenced by fl::PriorityQueue< T, Compare, VectorT >::emplace(), fl::PriorityQueue< T, Compare, VectorT >::push(), fl::PriorityQueue< T, Compare, VectorT >::push(), and push_heap().

+ Here is the caller graph for this function: