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

◆ push_back_move_impl()

void fl::vector_basic::push_back_move_impl ( void * element)

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

164 {
166 if (mSize >= mCapacity) return; // allocation failed
167 FASTLED_ASSERT(mArray != nullptr, "mArray null after ensure_capacity in push_back_move");
168 void* dst = element_ptr(mSize);
169 if (mOps) {
170 mOps->move_construct(dst, element);
171 } else {
172 fl::memcpy(dst, element, mElementSize);
173 }
174 ++mSize;
175}
const vector_element_ops * mOps
fl::size mElementSize
void ensure_capacity(fl::size n) FL_NOEXCEPT
Ensure capacity for at least n elements. Grows if needed.
void * element_ptr(fl::size index) FL_NOEXCEPT
Pointer to element at index (byte arithmetic).
void * memcpy(void *dest, const void *src, size_t n) FL_NOEXCEPT

References element_ptr(), ensure_capacity(), mArray, mCapacity, mElementSize, fl::memcpy(), mOps, and mSize.

Referenced by fl::vector< fl::i16 >::emplace_back(), and fl::vector< fl::i16 >::push_back().

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