FastLED
3.9.15
Loading...
Searching...
No Matches
◆
swap()
template<typename T, fl::size N>
void
fl::FixedVector
< T, N >::swap
(
FixedVector
< T, N > &
other
)
inline
Definition at line
327
of file
vector.h
.
327
{
328
if
(
this
!= &
other
) {
329
const
fl::size
max_size
=
MAX
(
current_size
,
other
.
current_size
);
330
for
(
fl::size
i
= 0;
i
<
max_size
; ++
i
) {
331
fl::swap
(
memory
()[
i
],
other
.
memory
()[
i
]);
332
}
333
// swap the sizes
334
fl::size
temp_size
=
current_size
;
335
current_size
=
other
.
current_size
;
336
other
.
current_size
=
temp_size
;
337
}
338
}
fl::FixedVector::current_size
fl::size current_size
Definition
vector.h:341
fl::FixedVector::memory
T * memory()
Definition
vector.h:82
fl::FixedVector
Definition
vector.h:78
MAX
#define MAX(a, b)
Definition
math_macros.h:37
fl::swap
void swap(array< T, N > &lhs, array< T, N > &rhs) noexcept(noexcept(lhs.swap(rhs)))
Definition
array.h:156
fl
FixedVector
Generated on Fri Aug 22 2025 20:59:36 for FastLED by
1.13.2