Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/BLI_span.hh
| Show First 20 Lines • Show All 516 Lines • ▼ Show 20 Lines | public: | ||||
| * Returns true if the size is zero. | * Returns true if the size is zero. | ||||
| */ | */ | ||||
| constexpr bool is_empty() const | constexpr bool is_empty() const | ||||
| { | { | ||||
| return size_ == 0; | return size_ == 0; | ||||
| } | } | ||||
| /** | /** | ||||
| * Returns the number of bytes referenced by this Span. | |||||
| */ | |||||
| constexpr int64_t size_in_bytes() const | |||||
| { | |||||
| return sizeof(T) * size_; | |||||
| } | |||||
| /** | |||||
| * Replace all elements in the referenced array with the given value. | * Replace all elements in the referenced array with the given value. | ||||
| */ | */ | ||||
| constexpr void fill(const T &value) | constexpr void fill(const T &value) | ||||
| { | { | ||||
| initialized_fill_n(data_, size_, value); | initialized_fill_n(data_, size_, value); | ||||
| } | } | ||||
| /** | /** | ||||
| ▲ Show 20 Lines • Show All 205 Lines • Show Last 20 Lines | |||||