DNA: add pragma once to dna_type_offsets.h

Sometimes, this generated file is included more than once,
so it should have an include guard.
This commit is contained in:
Jacques Lucke 2020-08-28 15:04:45 +02:00
parent 8726354d46
commit 4fdd8452a6
1 changed files with 1 additions and 0 deletions

View File

@ -1373,6 +1373,7 @@ static int make_structDNA(const char *base_directory,
/* write a simple enum with all structs offsets,
* should only be accessed via SDNA_TYPE_FROM_STRUCT macro */
{
fprintf(file_offsets, "#pragma once\n");
fprintf(file_offsets, "#define SDNA_TYPE_FROM_STRUCT(id) _SDNA_TYPE_##id\n");
fprintf(file_offsets, "enum {\n");
for (i = 0; i < structs_len; i++) {