diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 03:20:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 08:44:47 +0300 |
commit | b5dc3d43e4729db2c681571efa1bd2e1ce65bb2f (patch) | |
tree | f75d87e34de3969c178d7a926c860daaf60dc61a /source/blender/makesdna | |
parent | 451c533e25dde0c574a22fcbbd2624e09c804926 (diff) |
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.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 4 |
1 files changed, 4 insertions, 0 deletions
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. */ |