diff options
author | Hans Goudey <h.goudey@me.com> | 2022-06-04 14:31:30 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-06-04 14:31:30 +0300 |
commit | 23f8fc38d91012c68491f82a42b362eaca0cbfad (patch) | |
tree | baf8b9c40bc4307486266533d55b7a036d01c8df /source/blender/blenkernel/intern/customdata.cc | |
parent | 9531eb24b3172d83660649cc0936c05f66aff79b (diff) |
Cleanup: Remove unnecessary struct keywords
Diffstat (limited to 'source/blender/blenkernel/intern/customdata.cc')
-rw-r--r-- | source/blender/blenkernel/intern/customdata.cc | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index a63528835ee..aed570235aa 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -261,8 +261,8 @@ static void layerInterp_mdeformvert(const void **sources, }; MDeformVert *dvert = static_cast<MDeformVert *>(dest); - struct MDeformWeight_Link *dest_dwlink = nullptr; - struct MDeformWeight_Link *node; + MDeformWeight_Link *dest_dwlink = nullptr; + MDeformWeight_Link *node; /* build a list of unique def_nrs for dest */ int totweight = 0; @@ -289,7 +289,7 @@ static void layerInterp_mdeformvert(const void **sources, /* if this def_nr is not in the list, add it */ if (!node) { - struct MDeformWeight_Link *tmp_dwlink = static_cast<MDeformWeight_Link *>( + MDeformWeight_Link *tmp_dwlink = static_cast<MDeformWeight_Link *>( alloca(sizeof(*tmp_dwlink))); tmp_dwlink->dw.def_nr = dw->def_nr; tmp_dwlink->dw.weight = weight; @@ -2237,8 +2237,8 @@ static bool customdata_typemap_is_valid(const CustomData *data) } #endif -bool CustomData_merge(const struct CustomData *source, - struct CustomData *dest, +bool CustomData_merge(const CustomData *source, + CustomData *dest, eCustomDataMask mask, eCDAllocType alloctype, int totelem) @@ -2339,8 +2339,8 @@ void CustomData_realloc(CustomData *data, int totelem) } } -void CustomData_copy(const struct CustomData *source, - struct CustomData *dest, +void CustomData_copy(const CustomData *source, + CustomData *dest, eCustomDataMask mask, eCDAllocType alloctype, int totelem) @@ -2403,7 +2403,7 @@ void CustomData_free(CustomData *data, int totelem) CustomData_reset(data); } -void CustomData_free_typemask(struct CustomData *data, int totelem, eCustomDataMask mask) +void CustomData_free_typemask(CustomData *data, int totelem, eCustomDataMask mask) { for (int i = 0; i < data->totlayer; i++) { CustomDataLayer *layer = &data->layers[i]; @@ -2458,7 +2458,7 @@ int CustomData_get_layer_index(const CustomData *data, int type) return data->typemap[type]; } -int CustomData_get_layer_index_n(const struct CustomData *data, int type, int n) +int CustomData_get_layer_index_n(const CustomData *data, int type, int n) { BLI_assert(n >= 0); int i = CustomData_get_layer_index(data, type); @@ -2515,7 +2515,7 @@ int CustomData_get_stencil_layer_index(const CustomData *data, int type) /* -------------------------------------------------------------------- */ /* index values per layer type */ -int CustomData_get_named_layer(const struct CustomData *data, int type, const char *name) +int CustomData_get_named_layer(const CustomData *data, int type, const char *name) { const int named_index = CustomData_get_named_layer_index(data, type, name); const int layer_index = data->typemap[type]; @@ -2551,7 +2551,7 @@ int CustomData_get_stencil_layer(const CustomData *data, int type) return (layer_index != -1) ? data->layers[layer_index].active_mask : -1; } -const char *CustomData_get_active_layer_name(const struct CustomData *data, const int type) +const char *CustomData_get_active_layer_name(const CustomData *data, const int type) { /* Get the layer index of the active layer of this type. */ const int layer_index = CustomData_get_active_layer_index(data, type); @@ -2642,7 +2642,7 @@ void CustomData_set_layer_stencil_index(CustomData *data, int type, int n) } } -void CustomData_set_layer_flag(struct CustomData *data, int type, int flag) +void CustomData_set_layer_flag(CustomData *data, int type, int flag) { for (int i = 0; i < data->totlayer; i++) { if (data->layers[i].type == type) { @@ -2651,7 +2651,7 @@ void CustomData_set_layer_flag(struct CustomData *data, int type, int flag) } } -void CustomData_clear_layer_flag(struct CustomData *data, int type, int flag) +void CustomData_clear_layer_flag(CustomData *data, int type, int flag) { const int nflag = ~flag; @@ -2826,7 +2826,7 @@ void *CustomData_add_layer_named(CustomData *data, return nullptr; } -void *CustomData_add_layer_anonymous(struct CustomData *data, +void *CustomData_add_layer_anonymous(CustomData *data, int type, eCDAllocType alloctype, void *layerdata, @@ -3032,7 +3032,7 @@ void CustomData_duplicate_referenced_layers(CustomData *data, int totelem) } } -bool CustomData_is_referenced_layer(struct CustomData *data, int type) +bool CustomData_is_referenced_layer(CustomData *data, int type) { /* get the layer index of the first layer of type */ int layer_index = CustomData_get_active_layer_index(data, type); @@ -3077,7 +3077,7 @@ void CustomData_free_temporary(CustomData *data, int totelem) } } -void CustomData_set_only_copy(const struct CustomData *data, eCustomDataMask mask) +void CustomData_set_only_copy(const CustomData *data, eCustomDataMask mask) { for (int i = 0; i < data->totlayer; i++) { if (!(mask & CD_TYPE_AS_MASK(data->layers[i].type))) { @@ -3310,7 +3310,7 @@ void CustomData_interp(const CustomData *source, } } -void CustomData_swap_corners(struct CustomData *data, int index, const int *corner_indices) +void CustomData_swap_corners(CustomData *data, int index, const int *corner_indices) { for (int i = 0; i < data->totlayer; i++) { const LayerTypeInfo *typeInfo = layerType_getInfo(data->layers[i].type); @@ -3323,7 +3323,7 @@ void CustomData_swap_corners(struct CustomData *data, int index, const int *corn } } -void CustomData_swap(struct CustomData *data, const int index_a, const int index_b) +void CustomData_swap(CustomData *data, const int index_a, const int index_b) { char buff_static[256]; @@ -3402,7 +3402,7 @@ void *CustomData_get_layer_n(const CustomData *data, int type, int n) return data->layers[layer_index].data; } -void *CustomData_get_layer_named(const struct CustomData *data, int type, const char *name) +void *CustomData_get_layer_named(const CustomData *data, int type, const char *name) { int layer_index = CustomData_get_named_layer_index(data, type, name); if (layer_index == -1) { @@ -3469,7 +3469,7 @@ void *CustomData_set_layer(const CustomData *data, int type, void *ptr) return ptr; } -void *CustomData_set_layer_n(const struct CustomData *data, int type, int n, void *ptr) +void *CustomData_set_layer_n(const CustomData *data, int type, int n, void *ptr) { /* get the layer index of the first layer of type */ int layer_index = CustomData_get_layer_index_n(data, type, n); @@ -3986,7 +3986,7 @@ void *CustomData_bmesh_get_layer_n(const CustomData *data, void *block, int n) return POINTER_OFFSET(block, data->layers[n].offset); } -bool CustomData_layer_has_math(const struct CustomData *data, int layer_n) +bool CustomData_layer_has_math(const CustomData *data, int layer_n) { const LayerTypeInfo *typeInfo = layerType_getInfo(data->layers[layer_n].type); @@ -3998,7 +3998,7 @@ bool CustomData_layer_has_math(const struct CustomData *data, int layer_n) return false; } -bool CustomData_layer_has_interp(const struct CustomData *data, int layer_n) +bool CustomData_layer_has_interp(const CustomData *data, int layer_n) { const LayerTypeInfo *typeInfo = layerType_getInfo(data->layers[layer_n].type); @@ -4009,7 +4009,7 @@ bool CustomData_layer_has_interp(const struct CustomData *data, int layer_n) return false; } -bool CustomData_has_math(const struct CustomData *data) +bool CustomData_has_math(const CustomData *data) { /* interpolates a layer at a time */ for (int i = 0; i < data->totlayer; i++) { @@ -4021,7 +4021,7 @@ bool CustomData_has_math(const struct CustomData *data) return false; } -bool CustomData_bmesh_has_free(const struct CustomData *data) +bool CustomData_bmesh_has_free(const CustomData *data) { for (int i = 0; i < data->totlayer; i++) { if (!(data->layers[i].flag & CD_FLAG_NOFREE)) { @@ -4034,7 +4034,7 @@ bool CustomData_bmesh_has_free(const struct CustomData *data) return false; } -bool CustomData_has_interp(const struct CustomData *data) +bool CustomData_has_interp(const CustomData *data) { /* interpolates a layer at a time */ for (int i = 0; i < data->totlayer; i++) { @@ -4046,7 +4046,7 @@ bool CustomData_has_interp(const struct CustomData *data) return false; } -bool CustomData_has_referenced(const struct CustomData *data) +bool CustomData_has_referenced(const CustomData *data) { for (int i = 0; i < data->totlayer; i++) { if (data->layers[i].flag & CD_FLAG_NOFREE) { @@ -4505,7 +4505,7 @@ void CustomData_validate_layer_name(const CustomData *data, } } -bool CustomData_verify_versions(struct CustomData *data, int index) +bool CustomData_verify_versions(CustomData *data, int index) { const LayerTypeInfo *typeInfo; CustomDataLayer *layer = &data->layers[index]; |