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 456 of file vector.h.

456 {
457 // TODO: Introduce mMaxSize (and move it from SortedVector to here)
458 // push back and swap into place.
459 size_t target_idx = pos - begin();
461 auto last = end() - 1;
462 for (size_t curr_idx = last - begin(); curr_idx > target_idx; --curr_idx) {
463 auto first = begin() + curr_idx - 1;
464 auto second = begin() + curr_idx;
465 swap(first, second);
466 }
467 return true;
468 }
void push_back(const T &value)
Definition vector.h:324
iterator end()
Definition vector.h:348
iterator begin()
Definition vector.h:346
void swap(HeapVector< T > &other)
Definition vector.h:433