FastLED 3.10.8
Loading...
Searching...
No Matches

◆ push_back_move_impl()

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

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

177 {
179 if (mSize >= mCapacity) return; // allocation failed
180 FASTLED_ASSERT(mArray != nullptr, "mArray null after ensure_capacity in push_back_move");
181 void* dst = element_ptr(mSize);
182 if (mOps) {
183 mOps->move_construct(dst, element);
184 } else {
185 fl::memcpy(dst, element, mElementSize);
186 }
187 ++mSize;
188}
const vector_element_ops * mOps
void ensure_capacity(fl::size n) FL_NO_EXCEPT
Ensure capacity for at least n elements. Grows if needed.
void * element_ptr(fl::size index) FL_NO_EXCEPT
Pointer to element at index (byte arithmetic).
fl::size mElementSize
FASTLED_FORCE_INLINE void * memcpy(void *dest, const void *src, size_t n) FL_NO_EXCEPT
Definition cstring.h:136

References element_ptr(), ensure_capacity(), fl::FL_NO_EXCEPT, 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: