MCPcopy Create free account
hub / github.com/FastLED/FastLED / copy_from

Method copy_from

src/fl/stl/basic_vector.cpp.hpp:457–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455// ======= COPY / MOVE HELPERS =======
456
457void vector_basic::copy_from(const vector_basic& other) FL_NOEXCEPT {
458 clear_impl();
459 if (other.mSize == 0) return;
460
461 reserve_impl(other.mSize);
462 if (mCapacity < other.mSize) return;
463
464 if (mOps) {
465 for (fl::size i = 0; i < other.mSize; ++i) {
466 mOps->copy_construct(element_ptr(i), other.element_ptr(i));
467 }
468 } else {
469 trivial_copy(mArray, other.mArray, other.mSize);
470 }
471 mSize = other.mSize;
472}
473
474void vector_basic::move_from(vector_basic& other) FL_NOEXCEPT {
475 if (other.isInline()) {

Callers 4

VectorNFunction · 0.80
vector.hFile · 0.80
vector_psramMethod · 0.80
vector_psramClass · 0.80

Calls 1

element_ptrMethod · 0.80

Tested by

no test coverage detected