[Bf-blender-cvs] [09149b4f0d2] functions: Zero initialize before default construction to make it more deterministic
Jacques Lucke
noreply at git.blender.org
Thu Feb 6 15:42:22 CET 2020
Commit: 09149b4f0d2c3adec57a93678e357f0a8a87c68a
Author: Jacques Lucke
Date: Thu Feb 6 15:42:08 2020 +0100
Branches: functions
https://developer.blender.org/rB09149b4f0d2c3adec57a93678e357f0a8a87c68a
Zero initialize before default construction to make it more deterministic
===================================================================
M source/blender/functions/FN_attributes_ref.h
===================================================================
diff --git a/source/blender/functions/FN_attributes_ref.h b/source/blender/functions/FN_attributes_ref.h
index b63dd374d06..cf4a1773f12 100644
--- a/source/blender/functions/FN_attributes_ref.h
+++ b/source/blender/functions/FN_attributes_ref.h
@@ -46,6 +46,7 @@ class AttributesInfoBuilder : BLI::NonCopyable, BLI::NonMovable {
if (m_names.add(name)) {
m_types.append(&type);
void *dst = m_allocator.allocate(type.size(), type.alignment());
+ memset(dst, 0, type.size());
if (default_value == nullptr) {
type.construct_default(dst);
}
More information about the Bf-blender-cvs
mailing list