FastLED
3.9.15
Loading...
Searching...
No Matches
◆
swap()
template<typename T, size_t N>
void
fl::FixedVector
< T, N >::swap
(
FixedVector
< T, N > &
other
)
inline
Definition at line
288
of file
vector.h
.
288
{
289
if
(
this
!= &
other
) {
290
const
int
max_size
=
MAX
(
current_size
,
other
.
current_size
);
291
for
(
int
i
= 0;
i
<
max_size
; ++
i
) {
292
fl::swap
(
memory
()[
i
],
other
.
memory
()[
i
]);
293
}
294
// swap the sizes
295
size_t
temp_size
=
current_size
;
296
current_size
=
other
.
current_size
;
297
other
.
current_size
=
temp_size
;
298
}
299
}
fl::FixedVector::current_size
size_t current_size
Definition
vector.h:302
fl::FixedVector::memory
T * memory()
Definition
vector.h:74
fl::FixedVector
Definition
vector.h:70
MAX
#define MAX(a, b)
Definition
math_macros.h:11
fl::swap
void swap(array< T, N > &lhs, array< T, N > &rhs) noexcept(noexcept(lhs.swap(rhs)))
Definition
array.h:140
fl
FixedVector
Generated on Thu May 29 2025 04:44:58 for FastLED by
1.13.2