parent
42cdd39618
commit
1f76863f80
|
@ -91,8 +91,8 @@ class GSpan {
|
|||
{
|
||||
BLI_assert(start >= 0);
|
||||
BLI_assert(size >= 0);
|
||||
const int64_t new_size = std::max<int64_t>(0, std::min(size, size_ - start));
|
||||
return GSpan(type_, POINTER_OFFSET(data_, type_->size() * start), new_size);
|
||||
BLI_assert(start + size <= size_ || size == 0);
|
||||
return GSpan(type_, POINTER_OFFSET(data_, type_->size() * start), size);
|
||||
}
|
||||
|
||||
GSpan slice(const IndexRange range) const
|
||||
|
@ -218,8 +218,8 @@ class GMutableSpan {
|
|||
{
|
||||
BLI_assert(start >= 0);
|
||||
BLI_assert(size >= 0);
|
||||
const int64_t new_size = std::max<int64_t>(0, std::min(size, size_ - start));
|
||||
return GMutableSpan(*type_, POINTER_OFFSET(data_, type_->size() * start), new_size);
|
||||
BLI_assert(start + size <= size_ || size == 0);
|
||||
return GMutableSpan(type_, POINTER_OFFSET(data_, type_->size() * start), size);
|
||||
}
|
||||
|
||||
GMutableSpan slice(IndexRange range) const
|
||||
|
|
Loading…
Reference in New Issue