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

◆ insert()

template<typename T>
bool fl::HeapVector< T >::insert ( iterator pos,
const T & value )
inline

Definition at line 556 of file vector.h.

556 {
557 // TODO: Introduce mMaxSize (and move it from SortedVector to here)
558 // push back and swap into place.
559 size_t target_idx = pos - begin();
561 auto last = end() - 1;
562 for (size_t curr_idx = last - begin(); curr_idx > target_idx;
563 --curr_idx) {
564 auto first = begin() + curr_idx - 1;
565 auto second = begin() + curr_idx;
566 swap(first, second);
567 }
568 return true;
569 }
void push_back(const T &value)
Definition vector.h:442
iterator end()
Definition vector.h:466
iterator begin()
Definition vector.h:464
void swap(HeapVector< T > &other)
Definition vector.h:535