diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-30 11:28:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-30 11:29:41 +0300 |
commit | 01f9e13c301c850cf4b07725ac5e24b8d15dd53a (patch) | |
tree | 65627e59a26bfd5fd3626829cdd68ec71a3470ce /source/blender/blenkernel/intern | |
parent | d70970520370532b92213cfbf9813704fd45a602 (diff) |
Cleanup: use 'e' prefix for enum types
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 12 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 32 |
3 files changed, 26 insertions, 20 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 5ed7f6664a1..d2a3732a31d 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -716,7 +716,7 @@ void DM_to_mesh(DerivedMesh *dm, Mesh *me, Object *ob, CustomDataMask mask, bool Mesh tmp = *me; int totvert, totedge /*, totface */ /* UNUSED */, totloop, totpoly; int did_shapekeys = 0; - CDAllocType alloctype = CD_DUPLICATE; + eCDAllocType alloctype = CD_DUPLICATE; if (take_ownership && dm->type == DM_TYPE_CDDM && dm->needsFree) { bool has_any_referenced_layers = @@ -911,27 +911,27 @@ static void mesh_set_only_copy(Mesh *mesh, CustomDataMask mask) #endif } -void DM_add_vert_layer(DerivedMesh *dm, int type, CDAllocType alloctype, void *layer) +void DM_add_vert_layer(DerivedMesh *dm, int type, eCDAllocType alloctype, void *layer) { CustomData_add_layer(&dm->vertData, type, alloctype, layer, dm->numVertData); } -void DM_add_edge_layer(DerivedMesh *dm, int type, CDAllocType alloctype, void *layer) +void DM_add_edge_layer(DerivedMesh *dm, int type, eCDAllocType alloctype, void *layer) { CustomData_add_layer(&dm->edgeData, type, alloctype, layer, dm->numEdgeData); } -void DM_add_tessface_layer(DerivedMesh *dm, int type, CDAllocType alloctype, void *layer) +void DM_add_tessface_layer(DerivedMesh *dm, int type, eCDAllocType alloctype, void *layer) { CustomData_add_layer(&dm->faceData, type, alloctype, layer, dm->numTessFaceData); } -void DM_add_loop_layer(DerivedMesh *dm, int type, CDAllocType alloctype, void *layer) +void DM_add_loop_layer(DerivedMesh *dm, int type, eCDAllocType alloctype, void *layer) { CustomData_add_layer(&dm->loopData, type, alloctype, layer, dm->numLoopData); } -void DM_add_poly_layer(DerivedMesh *dm, int type, CDAllocType alloctype, void *layer) +void DM_add_poly_layer(DerivedMesh *dm, int type, eCDAllocType alloctype, void *layer) { CustomData_add_layer(&dm->polyData, type, alloctype, layer, dm->numPolyData); } diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index 346cea7150e..773ef90aac8 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -597,7 +597,7 @@ DerivedMesh *CDDM_from_mesh(Mesh *mesh) return CDDM_from_mesh_ex(mesh, CD_REFERENCE, CD_MASK_MESH); } -DerivedMesh *CDDM_from_mesh_ex(Mesh *mesh, CDAllocType alloctype, CustomDataMask mask) +DerivedMesh *CDDM_from_mesh_ex(Mesh *mesh, eCDAllocType alloctype, CustomDataMask mask) { CDDerivedMesh *cddm = cdDM_create(__func__); DerivedMesh *dm = &cddm->dm; diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 0c854551463..aa67eafaa98 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -1397,8 +1397,9 @@ void customData_mask_layers__print(CustomDataMask mask) /********************* CustomData functions *********************/ static void customData_update_offsets(CustomData *data); -static CustomDataLayer *customData_add_layer__internal(CustomData *data, int type, CDAllocType alloctype, void *layerdata, - int totelem, const char *name); +static CustomDataLayer *customData_add_layer__internal( + CustomData *data, int type, eCDAllocType alloctype, void *layerdata, + int totelem, const char *name); void CustomData_update_typemap(CustomData *data) { @@ -1427,8 +1428,9 @@ static bool customdata_typemap_is_valid(const CustomData *data) } #endif -bool CustomData_merge(const struct CustomData *source, struct CustomData *dest, - CustomDataMask mask, CDAllocType alloctype, int totelem) +bool CustomData_merge( + const struct CustomData *source, struct CustomData *dest, + CustomDataMask mask, eCDAllocType alloctype, int totelem) { /*const LayerTypeInfo *typeInfo;*/ CustomDataLayer *layer, *newlayer; @@ -1510,8 +1512,9 @@ void CustomData_realloc(CustomData *data, int totelem) } } -void CustomData_copy(const struct CustomData *source, struct CustomData *dest, - CustomDataMask mask, CDAllocType alloctype, int totelem) +void CustomData_copy( + const struct CustomData *source, struct CustomData *dest, + CustomDataMask mask, eCDAllocType alloctype, int totelem) { CustomData_reset(dest); @@ -1810,8 +1813,9 @@ static int customData_resize(CustomData *data, int amount) return 1; } -static CustomDataLayer *customData_add_layer__internal(CustomData *data, int type, CDAllocType alloctype, void *layerdata, - int totelem, const char *name) +static CustomDataLayer *customData_add_layer__internal( + CustomData *data, int type, eCDAllocType alloctype, void *layerdata, + int totelem, const char *name) { const LayerTypeInfo *typeInfo = layerType_getInfo(type); int flag = 0, index = data->totlayer; @@ -1898,8 +1902,9 @@ static CustomDataLayer *customData_add_layer__internal(CustomData *data, int typ return &data->layers[index]; } -void *CustomData_add_layer(CustomData *data, int type, CDAllocType alloctype, - void *layerdata, int totelem) +void *CustomData_add_layer( + CustomData *data, int type, eCDAllocType alloctype, + void *layerdata, int totelem) { CustomDataLayer *layer; const LayerTypeInfo *typeInfo = layerType_getInfo(type); @@ -1915,8 +1920,9 @@ void *CustomData_add_layer(CustomData *data, int type, CDAllocType alloctype, } /*same as above but accepts a name*/ -void *CustomData_add_layer_named(CustomData *data, int type, CDAllocType alloctype, - void *layerdata, int totelem, const char *name) +void *CustomData_add_layer_named( + CustomData *data, int type, eCDAllocType alloctype, + void *layerdata, int totelem, const char *name) { CustomDataLayer *layer; @@ -2673,7 +2679,7 @@ void CustomData_bmesh_init_pool(CustomData *data, int totelem, const char htype) bool CustomData_bmesh_merge( const CustomData *source, CustomData *dest, - CustomDataMask mask, CDAllocType alloctype, BMesh *bm, const char htype) + CustomDataMask mask, eCDAllocType alloctype, BMesh *bm, const char htype) { BMHeader *h; BMIter iter; |