FastLED 3.10.8
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 514 of file basic_vector.cpp.hpp.

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

References vector_basic(), clear_impl(), fl::FL_NO_EXCEPT, 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: