From 01f9e13c301c850cf4b07725ac5e24b8d15dd53a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 30 May 2018 10:28:24 +0200 Subject: Cleanup: use 'e' prefix for enum types --- source/blender/blenkernel/BKE_customdata.h | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'source/blender/blenkernel/BKE_customdata.h') diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index 89d34977843..85c894864d5 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -67,14 +67,14 @@ extern const CustomDataMask CD_MASK_EVERYTHING; * CD_NUMTYPES elements, that indicate if a layer can be copied. */ /* add/copy/merge allocation types */ -typedef enum CDAllocType { +typedef enum eCDAllocType { CD_ASSIGN = 0, /* use the data pointer */ CD_CALLOC = 1, /* allocate blank memory */ CD_DEFAULT = 2, /* allocate and set to default */ CD_REFERENCE = 3, /* use data pointers, set layer flag NOFREE */ CD_DUPLICATE = 4, /* do a full copy of all layers, only allowed if source * has same number of elements */ -} CDAllocType; +} eCDAllocType; #define CD_TYPE_AS_MASK(_type) (CustomDataMask)((CustomDataMask)1 << (CustomDataMask)(_type)) @@ -122,16 +122,18 @@ void CustomData_data_add(int type, void *data1, const void *data2); /* initializes a CustomData object with the same layer setup as source. * mask is a bitfield where (mask & (1 << (layer type))) indicates * if a layer should be copied or not. alloctype must be one of the above. */ -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); /* BMESH_TODO, not really a public function but readfile.c needs it */ void CustomData_update_typemap(struct CustomData *data); /* same as the above, except that this will preserve existing layers, and only * add the layers that were not there yet */ -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); /* Reallocate custom data to a new element count. * Only affects on data layers which are owned by the CustomData itself, @@ -146,7 +148,7 @@ void CustomData_realloc(struct CustomData *data, int totelem); * consistent with the new layout.*/ bool CustomData_bmesh_merge( const struct CustomData *source, struct CustomData *dest, - CustomDataMask mask, CDAllocType alloctype, struct BMesh *bm, const char htype); + CustomDataMask mask, eCDAllocType alloctype, struct BMesh *bm, const char htype); /** NULL's all members and resets the typemap. */ void CustomData_reset(struct CustomData *data); @@ -166,11 +168,13 @@ void CustomData_free_temporary(struct CustomData *data, int totelem); * backed by an external data array. the different allocation types are * defined above. returns the data of the layer. */ -void *CustomData_add_layer(struct CustomData *data, int type, CDAllocType alloctype, - void *layer, int totelem); +void *CustomData_add_layer( + struct CustomData *data, int type, eCDAllocType alloctype, + void *layer, int totelem); /*same as above but accepts a name */ -void *CustomData_add_layer_named(struct CustomData *data, int type, CDAllocType alloctype, - void *layer, int totelem, const char *name); +void *CustomData_add_layer_named( + struct CustomData *data, int type, eCDAllocType alloctype, + void *layer, int totelem, const char *name); /* frees the active or first data layer with the give type. * returns 1 on success, 0 if no layer with the given type is found -- cgit v1.2.3