Changeset View
Changeset View
Standalone View
Standalone View
source/blender/functions/intern/generic_vector_array.cc
| Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | for (const int i : IndexRange(values.size())) { | ||||
| values.get(i, buffer); | values.get(i, buffer); | ||||
| this->append(index, buffer); | this->append(index, buffer); | ||||
| type_.destruct(buffer); | type_.destruct(buffer); | ||||
| } | } | ||||
| } | } | ||||
| void GVectorArray::extend(const int64_t index, const GSpan values) | void GVectorArray::extend(const int64_t index, const GSpan values) | ||||
| { | { | ||||
| GVArrayForGSpan varray{values}; | GVArray_For_GSpan varray{values}; | ||||
| this->extend(index, varray); | this->extend(index, varray); | ||||
| } | } | ||||
| void GVectorArray::extend(IndexMask mask, const GVVectorArray &values) | void GVectorArray::extend(IndexMask mask, const GVVectorArray &values) | ||||
| { | { | ||||
| for (const int i : mask) { | for (const int i : mask) { | ||||
| GVArrayForGVVectorArrayIndex array{values, i}; | GVArray_For_GVVectorArrayIndex array{values, i}; | ||||
| this->extend(i, array); | this->extend(i, array); | ||||
| } | } | ||||
| } | } | ||||
| void GVectorArray::extend(IndexMask mask, const GVectorArray &values) | void GVectorArray::extend(IndexMask mask, const GVectorArray &values) | ||||
| { | { | ||||
| GVVectorArrayForGVectorArray virtual_values{values}; | GVVectorArray_For_GVectorArray virtual_values{values}; | ||||
| this->extend(mask, virtual_values); | this->extend(mask, virtual_values); | ||||
| } | } | ||||
| GMutableSpan GVectorArray::operator[](const int64_t index) | GMutableSpan GVectorArray::operator[](const int64_t index) | ||||
| { | { | ||||
| Item &item = items_[index]; | Item &item = items_[index]; | ||||
| return GMutableSpan{type_, item.start, item.length}; | return GMutableSpan{type_, item.start, item.length}; | ||||
| } | } | ||||
| Show All 19 Lines | |||||