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
();
560
push_back
(
value
);
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
}
fl::HeapVector::push_back
void push_back(const T &value)
Definition
vector.h:442
fl::HeapVector::end
iterator end()
Definition
vector.h:466
fl::HeapVector::begin
iterator begin()
Definition
vector.h:464
fl::HeapVector::swap
void swap(HeapVector< T > &other)
Definition
vector.h:535
fl::HeapVector
Definition
vector.h:305
fl
HeapVector
Generated on Thu May 29 2025 04:44:58 for FastLED by
1.13.2