Geometry Nodes: Simplify using OutputAttribute in a vector

Store the optional temporary span storage as a unique_ptr and move
it in the move constructor, to avoid the need to add a special move
constructor that clears the "show_warning" fields from it. Maybe this
is very slightly slower, but we'll need this class less often in the future
anyway.
This commit is contained in:
2021-09-16 12:03:32 -05:00
parent 31a0708cb1
commit ddb7cb7e4a
2 changed files with 14 additions and 5 deletions

View File

@@ -190,7 +190,7 @@ AttributeDomain attribute_domain_highest_priority(Span<AttributeDomain> domains)
void OutputAttribute::save()
{
save_has_been_called_ = true;
if (optional_span_varray_.has_value()) {
if (optional_span_varray_) {
optional_span_varray_->save();
}
if (save_) {