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

◆ push_back_copy_impl()

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

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

165 {
167 if (mSize >= mCapacity) return; // allocation failed
168 void* dst = element_ptr(mSize);
169 if (mOps) {
170 mOps->copy_construct(dst, element);
171 } else {
172 fl::memcpy(dst, element, mElementSize);
173 }
174 ++mSize;
175}
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, 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: