Commit: b5dc3d43e4729db2c681571efa1bd2e1ce65bb2f
Author: Campbell Barton
Date: Fri May 31 10:20:21 2019 +1000
Branches: master
https://developer.blender.org/rBb5dc3d43e4729db2c681571efa1bd2e1ce65bb2f
makesrna: quiet re-declared enum warning
Note that BLI_STATIC_ASSERT use in headers is likely to cause this
error again, we could have a version that takes a unique ID
to be used in headers.
===================================================================
M source/blender/makesdna/intern/makesdna.c
===================================================================
diff --git a/source/blender/makesdna/intern/makesdna.c
b/source/blender/makesdna/intern/makesdna.c
index 7e53231a547..80d37d89f14 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -902,9 +902,13 @@ static int calculate_struct_sizes(int firststruct, FILE
*file_verify, const char
fprintf(file_verify, "/* Verify struct sizes and member offsets are as
expected by DNA. */\n");
fprintf(file_verify, "#include \"BLI_assert.h\"\n\n");
fprintf(file_verify, "#define DNA_DEPRECATED\n");
+ /* Workaround enum naming collision in static asserts
+ * (ideally this included a unique name/id per file). */
+ fprintf(file_verify, "#define assert_line_ assert_line_DNA_\n");
for (int i = 0; *(includefiles[i]) != '\0'; i++) {
fprintf(file_verify, "#include \"%s%s\"\n", base_directory,
includefiles[i]);
}
+ fprintf(file_verify, "#undef assert_line_\n");
fprintf(file_verify, "\n");
/* Multiple iterations to handle nested structs. */
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs