From fea1d1d71fe4327f26ba2ec03d13509bbb9dfbfc Mon Sep 17 00:00:00 2001 From: Jesse Yurkovich Date: Thu, 25 Apr 2024 18:02:50 +0200 Subject: [PATCH] Fix: Unintentional move from constant in retrieve_attributes_for_transfer Moving a constant variable results in a copy occurring instead. This looks to have been an accidental change as part of ea937b304d68f623ff38. A few tools will warn about this: `Warning C26478 Don't use std::move on constant variables. (es.56)` `Warning cpp:S5415 "std::move" should not be called on a const object.` Pull Request: https://projects.blender.org/blender/blender/pulls/121063 --- source/blender/blenkernel/intern/attribute_access.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/attribute_access.cc b/source/blender/blenkernel/intern/attribute_access.cc index f69184175a3..e0121516b63 100644 --- a/source/blender/blenkernel/intern/attribute_access.cc +++ b/source/blender/blenkernel/intern/attribute_access.cc @@ -811,7 +811,7 @@ Vector retrieve_attributes_for_transfer( return true; } - const GVArray src = *src_attributes.lookup(id, meta_data.domain); + GVArray src = *src_attributes.lookup(id, meta_data.domain); GSpanAttributeWriter dst = dst_attributes.lookup_or_add_for_write_only_span( id, meta_data.domain, meta_data.data_type); attributes.append({std::move(src), meta_data, std::move(dst)});