From 14d0b57be7e0fa3f789abab6faee2fed53d8bb59 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Tue, 22 Nov 2022 12:49:51 -0600 Subject: [PATCH] Cleanup: Use array_utils to copy evaluated field array --- source/blender/functions/intern/field.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/blender/functions/intern/field.cc b/source/blender/functions/intern/field.cc index d2205864945..554f1a6f036 100644 --- a/source/blender/functions/intern/field.cc +++ b/source/blender/functions/intern/field.cc @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ +#include "BLI_array_utils.hh" #include "BLI_index_mask_ops.hh" #include "BLI_map.hh" #include "BLI_multi_value_map.hh" @@ -468,11 +469,7 @@ Vector evaluate_fields(ResourceScope &scope, } /* Still have to copy over the data in the destination provided by the caller. */ if (dst_varray.is_span()) { - /* Materialize into a span. */ - threading::parallel_for(mask.index_range(), 2048, [&](const IndexRange range) { - computed_varray.materialize_to_uninitialized(mask.slice(range), - dst_varray.get_internal_span().data()); - }); + array_utils::copy(computed_varray, mask, dst_varray.get_internal_span()); } else { /* Slower materialize into a different structure. */