FastLED
3.9.15
Loading...
Searching...
No Matches
◆
insert()
template<typename T, typename Allocator = fl::allocator<T>>
bool
fl::HeapVector
< T, Allocator >::insert
(
iterator
pos
,
const T &
value
)
inline
Definition at line
602
of file
vector.h
.
602
{
603
// TODO: Introduce mMaxSize (and move it from SortedVector to here)
604
// push back and swap into place.
605
size_t
target_idx
=
pos
-
begin
();
606
push_back
(
value
);
607
auto
last
=
end
() - 1;
608
for
(
size_t
curr_idx
=
last
-
begin
();
curr_idx
>
target_idx
;
609
--
curr_idx
) {
610
auto
first
=
begin
() +
curr_idx
- 1;
611
auto
second
=
begin
() +
curr_idx
;
612
swap
(
first
,
second
);
613
}
614
return
true
;
615
}
fl::HeapVector< T, Allocator >::swap
void swap(HeapVector< T > &other)
Definition
vector.h:587
fl::HeapVector< T, Allocator >::begin
iterator begin()
Definition
vector.h:516
fl::HeapVector< T, Allocator >::end
iterator end()
Definition
vector.h:518
fl::HeapVector< T, Allocator >::push_back
void push_back(const T &value)
Definition
vector.h:493
fl::HeapVector
Definition
vector.h:305
fl
HeapVector
Generated on Thu Jun 5 2025 04:29:40 for FastLED by
1.13.2