diff options
author | Jacques Lucke <jacques@blender.org> | 2022-03-29 10:28:46 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-03-29 10:29:09 +0300 |
commit | 7bd614d43120ad8f5be8a8e5d3f44e7a160b09a7 (patch) | |
tree | 6198210685944f8e5840673894eae302a7239297 /source/blender/functions/intern | |
parent | d7c644211898185579597588bb4fc08edc1a5093 (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/intern')
-rw-r--r-- | source/blender/functions/intern/field.cc | 2 |
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; } |