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-03-25 13:36:08 +0300
committerSergey Sharybin <sergey@blender.org>2022-03-25 13:45:50 +0300
commit0c33e84020deca84c987dffa1302651f59c27158 (patch)
tree7921c909a2e76fcc260bbbf2556fe4ffe4d91abd /source/blender/makesdna/intern
parent03df72ee4e7e7f9893df73de426cdc3af1c7a676 (diff)
Fix compilation warnings after previous change
Thanks Jacques for finding solution for deprecation warning which was generated by GCC for constructor. The rest of the change is related on fixing memaccess warning which was happening when memset/memcpy was used directly on the DNA object pointer. Now there are two utility functions for this: - blender::dna::zero_memory - blender::dna::copy_memory
Diffstat (limited to 'source/blender/makesdna/intern')
-rw-r--r--source/blender/makesdna/intern/dna_utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesdna/intern/dna_utils.c b/source/blender/makesdna/intern/dna_utils.c
index 560b91b925e..bc2584fe57a 100644
--- a/source/blender/makesdna/intern/dna_utils.c
+++ b/source/blender/makesdna/intern/dna_utils.c
@@ -319,4 +319,10 @@ void _DNA_internal_memcpy(void *dst, const void *src, const size_t size)
memcpy(dst, src, size);
}
+void _DNA_internal_memzero(void *dst, size_t size);
+void _DNA_internal_memzero(void *dst, const size_t size)
+{
+ memset(dst, 0, size);
+}
+
/** \} */