FastLED 3.9.15
Loading...
Searching...
No Matches

◆ move_assign()

void fl::vector_basic::move_assign ( vector_basic & other)
protected

Move-assign from another vector_basic (clears this first).

Definition at line 507 of file basic_vector.cpp.hpp.

507 {
508 if (this == &other) return;
509 clear_impl();
510 if (!isInline() && mArray) {
511 mResource->deallocate(mArray, mCapacity * mElementSize);
512 mArray = nullptr;
513 mCapacity = 0;
514 }
515 if (hasInlineBuffer()) {
518 }
519 move_from(other);
520}
bool hasInlineBuffer() const FL_NOEXCEPT
Does this vector have an inline buffer at all?
bool isInline() const FL_NOEXCEPT
Is data currently in the inline buffer?
fl::size mElementSize
memory_resource * mResource
void move_from(vector_basic &other) FL_NOEXCEPT
Move-steal contents from another vector_basic.
fl::size mInlineCapacity
void * inlineBufferPtr() FL_NOEXCEPT
Compute inline buffer pointer from offset.
void clear_impl() FL_NOEXCEPT

References vector_basic(), clear_impl(), FL_NOEXCEPT, hasInlineBuffer(), inlineBufferPtr(), isInline(), mArray, mCapacity, mElementSize, mInlineCapacity, move_from(), and mResource.

Referenced by fl::vector< fl::i16 >::operator=(), operator=(), fl::vector_psram< T >::operator=(), and fl::VectorN< T, INLINED_SIZE >::operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: