Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/BLI_array.hh
| Show First 20 Lines • Show All 170 Lines • ▼ Show 20 Lines | else { | ||||
| data_ = other.data_; | data_ = other.data_; | ||||
| } | } | ||||
| size_ = other.size_; | size_ = other.size_; | ||||
| other.data_ = other.inline_buffer_; | other.data_ = other.inline_buffer_; | ||||
| other.size_ = 0; | other.size_ = 0; | ||||
| } | } | ||||
| /** | |||||
| * Create array from another allocated values. | |||||
| */ | |||||
| Array(const int64_t size, T *data_other, const bool /* no_allocated */, Allocator allocator = {}) | |||||
| : Array(NoExceptConstructor(), allocator) | |||||
| { | |||||
| BLI_assert(size >= 0); | |||||
| data_ = data_other; | |||||
| size_ = size; | |||||
| } | |||||
| ~Array() | ~Array() | ||||
| { | { | ||||
| destruct_n(data_, size_); | destruct_n(data_, size_); | ||||
| this->deallocate_if_not_inline(data_); | this->deallocate_if_not_inline(data_); | ||||
| } | } | ||||
| Array &operator=(const Array &other) | Array &operator=(const Array &other) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 260 Lines • Show Last 20 Lines | |||||