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

◆ push_back_copy_impl()

void fl::vector_basic::push_back_copy_impl ( const void * element)

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

152 {
154 if (mSize >= mCapacity) return; // allocation failed
155 void* dst = element_ptr(mSize);
156 if (mOps) {
157 mOps->copy_construct(dst, element);
158 } else {
159 fl::memcpy(dst, element, mElementSize);
160 }
161 ++mSize;
162}
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(), mCapacity, mElementSize, fl::memcpy(), mOps, and mSize.

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

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