| 455 | // ======= COPY / MOVE HELPERS ======= |
| 456 | |
| 457 | void 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 | |
| 474 | void vector_basic::move_from(vector_basic& other) FL_NOEXCEPT { |
| 475 | if (other.isInline()) { |
no test coverage detected