FastLED
3.9.15
Loading...
Searching...
No Matches
◆
insert()
[1/2]
template<typename T, typename Allocator = fl::allocator<T>>
bool
fl::HeapVector
< T, Allocator >::insert
(
iterator
pos
,
const T &
value
)
inline
Definition at line
683
of file
vector.h
.
683
{
684
// TODO: Introduce mMaxSize (and move it from SortedVector to here)
685
// push back and swap into place.
686
fl::size
target_idx
=
pos
-
begin
();
687
push_back
(
value
);
688
auto
last
=
end
() - 1;
689
for
(
fl::size
curr_idx
=
last
-
begin
();
curr_idx
>
target_idx
;
690
--
curr_idx
) {
691
auto
first
=
begin
() +
curr_idx
- 1;
692
auto
second
=
begin
() +
curr_idx
;
693
swap
(
first
,
second
);
694
}
695
return
true
;
696
}
fl::HeapVector< T, Allocator >::swap
void swap(HeapVector< T > &other)
Definition
vector.h:663
fl::HeapVector< T, Allocator >::begin
iterator begin()
Definition
vector.h:584
fl::HeapVector< T, Allocator >::end
iterator end()
Definition
vector.h:590
fl::HeapVector< T, Allocator >::push_back
void push_back(const T &value)
Definition
vector.h:552
fl::HeapVector
Definition
vector.h:345
fl
HeapVector
Generated on Fri Aug 22 2025 20:59:36 for FastLED by
1.13.2