FastLED
3.9.15
Loading...
Searching...
No Matches
◆
insert()
[2/2]
template<typename T, typename Allocator = fl::allocator<T>>
bool
fl::HeapVector
< T, Allocator >::insert
(
iterator
pos
,
T &&
value
)
inline
Definition at line
699
of file
vector.h
.
699
{
700
// push back and swap into place.
701
fl::size
target_idx
=
pos
-
begin
();
702
push_back
(
fl::move
(
value
));
703
auto
last
=
end
() - 1;
704
for
(
fl::size
curr_idx
=
last
-
begin
();
curr_idx
>
target_idx
;
705
--
curr_idx
) {
706
auto
first
=
begin
() +
curr_idx
- 1;
707
auto
second
=
begin
() +
curr_idx
;
708
swap
(
first
,
second
);
709
}
710
return
true
;
711
}
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