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:
authorSergey Sharybin <sergey@blender.org>2022-04-12 11:56:51 +0300
committerSergey Sharybin <sergey@blender.org>2022-04-13 12:48:12 +0300
commit25c357124de8905360c44a5a842284089ddec341 (patch)
treed7f7de7c459d622366ba5b0a7caec720c97f35c7 /source/blender/nodes/shader
parentda66c0519fce9bff981370868a359e64198552bc (diff)
Cover some DNA files with C++ utility macros
Solves compilation warning with Clang, and moves manipulation with DNA structures to the designed way for C++. The tests and few other places are update to the new code by Jacques. Ref T96847 Maniphest Tasks: T96847 Differential Revision: https://developer.blender.org/D14625
Diffstat (limited to 'source/blender/nodes/shader')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.cc b/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.cc
index f628d1ec77b..17fff4a7e1e 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_pointdensity.cc
@@ -79,7 +79,7 @@ static void node_shader_free_tex_pointdensity(bNode *node)
PointDensity *pd = &point_density->pd;
RE_point_density_free(pd);
BKE_texture_pointdensity_free_data(pd);
- memset(pd, 0, sizeof(*pd));
+ *pd = dna::shallow_zero_initialize();
MEM_freeN(point_density);
}
@@ -90,7 +90,7 @@ static void node_shader_copy_tex_pointdensity(bNodeTree *UNUSED(dest_ntree),
dest_node->storage = MEM_dupallocN(src_node->storage);
NodeShaderTexPointDensity *point_density = (NodeShaderTexPointDensity *)dest_node->storage;
PointDensity *pd = &point_density->pd;
- memset(pd, 0, sizeof(*pd));
+ *pd = dna::shallow_zero_initialize();
}
} // namespace blender::nodes::node_shader_tex_pointdensity_cc