diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-08 09:12:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-08 09:12:39 +0300 |
commit | da67a19ed9b5e8c5f61926d88653c05ebd3cdf45 (patch) | |
tree | 561f4c4c7083912eab3855dc0c4d5ec2be8c1df8 /source/blender/makesdna/intern/dna_genfile.c | |
parent | 2545119112875a098d8d807c84b7f7a3e1bcd338 (diff) |
Cleanup: move public doc-strings into headers for 'makesdna'
Ref T92709
Diffstat (limited to 'source/blender/makesdna/intern/dna_genfile.c')
-rw-r--r-- | source/blender/makesdna/intern/dna_genfile.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 8aa2a07d071..bdf29b22787 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -177,13 +177,6 @@ static bool ispointer(const char *name) return (name[0] == '*' || (name[0] == '(' && name[1] == '*')); } -/** - * Returns the size of struct fields of the specified type and name. - * - * \param type: Index into sdna->types/types_size - * \param name: Index into sdna->names, - * needed to extract possible pointer/array information. - */ int DNA_elem_size_nr(const SDNA *sdna, short type, short name) { const char *cp = sdna->names[name]; @@ -265,9 +258,6 @@ static int dna_struct_find_nr_ex_impl( return -1; } -/** - * Returns the index of the struct info for the struct with the specified name. - */ int DNA_struct_find_nr_ex(const SDNA *sdna, const char *str, unsigned int *index_last) { return dna_struct_find_nr_ex_impl( @@ -284,7 +274,6 @@ int DNA_struct_find_nr_ex(const SDNA *sdna, const char *str, unsigned int *index index_last); } -/** \note requires #DNA_sdna_alias_data_ensure_structs_map to be called. */ int DNA_struct_alias_find_nr_ex(const SDNA *sdna, const char *str, unsigned int *index_last) { #ifdef WITH_DNA_GHASH @@ -310,7 +299,6 @@ int DNA_struct_find_nr(const SDNA *sdna, const char *str) return DNA_struct_find_nr_ex(sdna, str, &index_last_dummy); } -/** \note requires #DNA_sdna_alias_data_ensure_structs_map to be called. */ int DNA_struct_alias_find_nr(const SDNA *sdna, const char *str) { unsigned int index_last_dummy = UINT_MAX; @@ -544,9 +532,6 @@ static bool init_structDNA(SDNA *sdna, bool do_endian_swap, const char **r_error return true; } -/** - * Constructs and returns a decoded SDNA structure from the given encoded SDNA data block. - */ SDNA *DNA_sdna_from_data(const void *data, const int data_len, bool do_endian_swap, @@ -691,10 +676,6 @@ static void set_compare_flags_for_struct(const SDNA *oldsdna, compare_flags[old_struct_index] = SDNA_CMP_EQUAL; } -/** - * Constructs and returns an array of byte flags with one element for each struct in oldsdna, - * indicating how it compares to newsdna. - */ const char *DNA_struct_get_compareflags(const SDNA *oldsdna, const SDNA *newsdna) { if (oldsdna->structs_len == 0) { @@ -1018,13 +999,6 @@ static int get_member_size_in_bytes(const SDNA *sdna, const SDNA_StructMember *m return type_size * array_length; } -/** - * Does endian swapping on the fields of a struct value. - * - * \param sdna: SDNA of the struct_nr belongs to - * \param struct_nr: Index of struct info within sdna - * \param data: Struct data that is to be converted - */ void DNA_struct_switch_endian(const SDNA *sdna, int struct_nr, char *data) { if (struct_nr == -1) { @@ -1230,13 +1204,6 @@ static void reconstruct_structs(const DNA_ReconstructInfo *reconstruct_info, } } -/** - * \param reconstruct_info: Information preprocessed by #DNA_reconstruct_info_create. - * \param old_struct_nr: Index of struct info within oldsdna. - * \param blocks: The number of array elements. - * \param old_blocks: Array of struct data. - * \return An allocated reconstructed struct. - */ void *DNA_struct_reconstruct(const DNA_ReconstructInfo *reconstruct_info, int old_struct_nr, int blocks, @@ -1534,10 +1501,6 @@ static int compress_reconstruct_steps(ReconstructStep *steps, const int old_step return new_step_count; } -/** - * Pre-process information about how structs in \a newsdna can be reconstructed from structs in - * \a oldsdna. This information is then used to speedup #DNA_struct_reconstruct. - */ DNA_ReconstructInfo *DNA_reconstruct_info_create(const SDNA *oldsdna, const SDNA *newsdna, const char *compare_flags) @@ -1597,10 +1560,6 @@ void DNA_reconstruct_info_free(DNA_ReconstructInfo *reconstruct_info) MEM_freeN(reconstruct_info); } -/** - * Returns the offset of the field with the specified name and type within the specified - * struct type in #SDNA, -1 on failure. - */ int DNA_elem_offset(SDNA *sdna, const char *stype, const char *vartype, const char *name) { const int SDNAnr = DNA_struct_find_nr(sdna, stype); @@ -1632,7 +1591,6 @@ bool DNA_struct_elem_find(const SDNA *sdna, return false; } -/** \note requires #DNA_sdna_alias_data_ensure_structs_map to be called. */ bool DNA_struct_alias_elem_find(const SDNA *sdna, const char *stype, const char *vartype, @@ -1651,9 +1609,6 @@ bool DNA_struct_alias_elem_find(const SDNA *sdna, return false; } -/** - * Returns the size in bytes of a primitive type. - */ int DNA_elem_type_size(const eSDNA_Type elem_nr) { /* should contain all enum types */ @@ -1696,9 +1651,6 @@ static bool DNA_sdna_patch_struct_nr(SDNA *sdna, sdna->types[struct_info->type] = struct_name_new; return true; } -/** - * Rename a struct - */ bool DNA_sdna_patch_struct(SDNA *sdna, const char *struct_name_old, const char *struct_name_new) { const int struct_name_old_nr = DNA_struct_find_nr(sdna, struct_name_old); @@ -1756,11 +1708,6 @@ static bool DNA_sdna_patch_struct_member_nr(SDNA *sdna, } return false; } -/** - * Replace \a elem_old with \a elem_new for struct \a struct_name - * handles search & replace, maintaining surrounding non-identifier characters - * such as pointer & array size. - */ bool DNA_sdna_patch_struct_member(SDNA *sdna, const char *struct_name, const char *elem_old, @@ -1909,10 +1856,6 @@ void DNA_sdna_alias_data_ensure(SDNA *sdna) BLI_ghash_free(elem_map_alias_from_static, MEM_freeN, NULL); } -/** - * Separated from #DNA_sdna_alias_data_ensure because it's not needed - * unless we want to lookup aliased struct names (#DNA_struct_alias_find_nr and friends). - */ void DNA_sdna_alias_data_ensure_structs_map(SDNA *sdna) { DNA_sdna_alias_data_ensure(sdna); |