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:
authorJacques Lucke <jacques@blender.org>2020-08-28 16:04:45 +0300
committerJacques Lucke <jacques@blender.org>2020-08-28 16:05:47 +0300
commit4fdd8452a6a714ceddd4a2c5105f64b9ccf7e265 (patch)
tree4a55a32827c67c718de4a3f73a449d063b43b2f8
parent8726354d465ae0930adcab9ba818414681cee077 (diff)
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.
-rw-r--r--source/blender/makesdna/intern/makesdna.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 7aaedbff1ce..29e29961028 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -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++) {