Refactor: BLI: Add MutableSpan::contains() function
Add `bool MutableSpan<T>::contains(const T &value)` function, which is an exact copy of the function from the `Span<T>` class. This makes it possible to call `.contains()` directly on the `MutableSpan`, instead of having to call `.as_span()` first. Note that the `contains_ptr()` function was already copied from `Span` to `MutableSpan` before. No functional changes to the affected code, just the removal of the now no longer necessary `.to_span()` call. Pull Request: https://projects.blender.org/blender/blender/pulls/131149
This commit is contained in:
@@ -1364,7 +1364,7 @@ static int exec(bContext *C, wmOperator * /*op*/)
|
||||
[&](const int i) { cyclic.span[i] = !cyclic.span[i]; });
|
||||
cyclic.finish();
|
||||
|
||||
if (!cyclic.span.as_span().contains(true)) {
|
||||
if (!cyclic.span.contains(true)) {
|
||||
attributes.remove("cyclic");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user