Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2022-03-29 10:28:46 +0300
committerJacques Lucke <jacques@blender.org>2022-03-29 10:29:09 +0300
commit7bd614d43120ad8f5be8a8e5d3f44e7a160b09a7 (patch)
tree6198210685944f8e5840673894eae302a7239297 /source/blender/functions
parentd7c644211898185579597588bb4fc08edc1a5093 (diff)
Cleanup: use value initialization instead of copying default value
Value-initialization has the potential to be more efficient. Also, the code becomes simpler.
Diffstat (limited to 'source/blender/functions')
-rw-r--r--source/blender/functions/intern/field.cc2
1 files changed, 1 insertions, 1 deletions
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;
}