diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/makesdna/DNA_genfile.h | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/makesdna/DNA_genfile.h')
-rw-r--r-- | source/blender/makesdna/DNA_genfile.h | 81 |
1 files changed, 45 insertions, 36 deletions
diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h index d9fc14d9393..6a9d50ecc2d 100644 --- a/source/blender/makesdna/DNA_genfile.h +++ b/source/blender/makesdna/DNA_genfile.h @@ -46,69 +46,78 @@ extern const int DNAlen; * hard-coded values against those from old files. */ typedef enum eSDNA_Type { - SDNA_TYPE_CHAR = 0, - SDNA_TYPE_UCHAR = 1, - SDNA_TYPE_SHORT = 2, - SDNA_TYPE_USHORT = 3, - SDNA_TYPE_INT = 4, - /* SDNA_TYPE_LONG = 5, */ /* deprecated (use as int) */ - /* SDNA_TYPE_ULONG = 6, */ /* deprecated (use as int) */ - SDNA_TYPE_FLOAT = 7, - SDNA_TYPE_DOUBLE = 8, - /* ,SDNA_TYPE_VOID = 9 */ + SDNA_TYPE_CHAR = 0, + SDNA_TYPE_UCHAR = 1, + SDNA_TYPE_SHORT = 2, + SDNA_TYPE_USHORT = 3, + SDNA_TYPE_INT = 4, + /* SDNA_TYPE_LONG = 5, */ /* deprecated (use as int) */ + /* SDNA_TYPE_ULONG = 6, */ /* deprecated (use as int) */ + SDNA_TYPE_FLOAT = 7, + SDNA_TYPE_DOUBLE = 8, +/* ,SDNA_TYPE_VOID = 9 */ /* define so switch statements don't complain */ #define SDNA_TYPE_VOID 9 - SDNA_TYPE_INT64 = 10, - SDNA_TYPE_UINT64 = 11, + SDNA_TYPE_INT64 = 10, + SDNA_TYPE_UINT64 = 11, } eSDNA_Type; /** * For use with #DNA_struct_reconstruct & #DNA_struct_get_compareflags */ enum eSDNA_StructCompare { - /* Struct has disappeared - * (values of this struct type will not be loaded by the current Blender) */ - SDNA_CMP_REMOVED = 0, - /* Struct is the same - * (can be loaded with straight memory copy after any necessary endian conversion) */ - SDNA_CMP_EQUAL = 1, - /* Struct is different in some way - * (needs to be copied/converted field by field) */ - SDNA_CMP_NOT_EQUAL = 2, + /* Struct has disappeared + * (values of this struct type will not be loaded by the current Blender) */ + SDNA_CMP_REMOVED = 0, + /* Struct is the same + * (can be loaded with straight memory copy after any necessary endian conversion) */ + SDNA_CMP_EQUAL = 1, + /* Struct is different in some way + * (needs to be copied/converted field by field) */ + SDNA_CMP_NOT_EQUAL = 2, }; -struct SDNA *DNA_sdna_from_data( - const void *data, const int data_len, - bool do_endian_swap, bool data_alloc, - const char **r_error_message); +struct SDNA *DNA_sdna_from_data(const void *data, + const int data_len, + bool do_endian_swap, + bool data_alloc, + const char **r_error_message); void DNA_sdna_free(struct SDNA *sdna); /* Access for current Blender versions SDNA*/ -void DNA_sdna_current_init(void); +void DNA_sdna_current_init(void); /* borrowed reference */ const struct SDNA *DNA_sdna_current_get(void); -void DNA_sdna_current_free(void); +void DNA_sdna_current_free(void); int DNA_struct_find_nr_ex(const struct SDNA *sdna, const char *str, unsigned int *index_last); int DNA_struct_find_nr(const struct SDNA *sdna, const char *str); void DNA_struct_switch_endian(const struct SDNA *oldsdna, int oldSDNAnr, char *data); const char *DNA_struct_get_compareflags(const struct SDNA *sdna, const struct SDNA *newsdna); -void *DNA_struct_reconstruct( - const struct SDNA *newsdna, const struct SDNA *oldsdna, - const char *compflags, int oldSDNAnr, int blocks, const void *data); +void *DNA_struct_reconstruct(const struct SDNA *newsdna, + const struct SDNA *oldsdna, + const char *compflags, + int oldSDNAnr, + int blocks, + const void *data); int DNA_elem_offset(struct SDNA *sdna, const char *stype, const char *vartype, const char *name); bool DNA_struct_find(const struct SDNA *sdna, const char *stype); -bool DNA_struct_elem_find(const struct SDNA *sdna, const char *stype, const char *vartype, const char *name); - +bool DNA_struct_elem_find(const struct SDNA *sdna, + const char *stype, + const char *vartype, + const char *name); int DNA_elem_type_size(const eSDNA_Type elem_nr); -bool DNA_sdna_patch_struct( - struct SDNA *sdna, const char *struct_name_old, const char *struct_name_new); -bool DNA_sdna_patch_struct_member( - struct SDNA *sdna, const char *struct_name, const char *elem_old, const char *elem_new); +bool DNA_sdna_patch_struct(struct SDNA *sdna, + const char *struct_name_old, + const char *struct_name_new); +bool DNA_sdna_patch_struct_member(struct SDNA *sdna, + const char *struct_name, + const char *elem_old, + const char *elem_new); void DNA_sdna_alias_data_ensure(struct SDNA *sdna); |