From bab47b60cb69c500869a3339654ad7d48dddf385 Mon Sep 17 00:00:00 2001 From: Simon Lenz Date: Wed, 12 Jan 2022 18:02:08 +0100 Subject: DNA: Add space clip editor defaults This is my attempt of adding defaults for the space clip editor struct (in line with https://developer.blender.org/T80164). It adds the default allocation for `SpaceClip` and `node_composite_movieclip.cc`. This also solves the error below (for C++ files using the DNA_default_alloc), which was put forward by Sergey Sharybin. Differential Revision: https://developer.blender.org/D13367 Reviewed by: Julian Eisel --- source/blender/makesdna/DNA_defaults.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_defaults.h') diff --git a/source/blender/makesdna/DNA_defaults.h b/source/blender/makesdna/DNA_defaults.h index 6e986129143..ef7f573e7a8 100644 --- a/source/blender/makesdna/DNA_defaults.h +++ b/source/blender/makesdna/DNA_defaults.h @@ -48,7 +48,9 @@ uint8_t *_DNA_struct_default_alloc_impl(const uint8_t *data_src, #define DNA_struct_default_alloc(struct_name) \ (struct_name *)_DNA_struct_default_alloc_impl( \ - DNA_default_table[SDNA_TYPE_FROM_STRUCT(struct_name)], sizeof(struct_name), __func__) + (const uint8_t *)DNA_default_table[SDNA_TYPE_FROM_STRUCT(struct_name)], \ + sizeof(struct_name), \ + __func__) #ifdef __cplusplus } -- cgit v1.2.3