From 7bd614d43120ad8f5be8a8e5d3f44e7a160b09a7 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Tue, 29 Mar 2022 09:28:46 +0200 Subject: Cleanup: use value initialization instead of copying default value Value-initialization has the potential to be more efficient. Also, the code becomes simpler. --- source/blender/functions/intern/field.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/functions') diff --git a/source/blender/functions/intern/field.cc b/source/blender/functions/intern/field.cc index 9f742f11ce4..986d6ddc19e 100644 --- a/source/blender/functions/intern/field.cc +++ b/source/blender/functions/intern/field.cc @@ -489,7 +489,7 @@ void evaluate_constant_field(const GField &field, void *r_value) { if (field.node().depends_on_input()) { const CPPType &type = field.cpp_type(); - type.copy_construct(type.default_value(), r_value); + type.value_initialize(r_value); return; } -- cgit v1.2.3