Grow to new_capacity. Moves existing elements.
Definition at line 58 of file basic_vector.cpp.hpp.
58 {
59
66 return;
67 }
68 }
69
70
71 FASTLED_ASSERT(
mResource !=
nullptr,
"memory_resource is null");
73 FASTLED_ASSERT(alloc_bytes > 0, "zero allocation in grow_to");
74 void* new_buf =
mResource->allocate(alloc_bytes);
75 FASTLED_ASSERT(new_buf != nullptr, "allocation failed in grow_to");
76 if (!new_buf) return;
77
78
83 } else {
85 }
86 }
87
88
91 }
92
95}
const vector_element_ops * mOps
bool isInline() const FL_NOEXCEPT
Is data currently in the inline buffer?
memory_resource * mResource
void trivial_copy(void *dst, const void *src, fl::size count) const FL_NOEXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)
References isInline(), mArray, mCapacity, mElementSize, mOps, mResource, mSize, and trivial_copy().
Referenced by ensure_capacity(), and reserve_impl().