Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-30 11:28:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-30 11:29:41 +0300
commit01f9e13c301c850cf4b07725ac5e24b8d15dd53a (patch)
tree65627e59a26bfd5fd3626829cdd68ec71a3470ce /source/blender/blenkernel/BKE_customdata.h
parentd70970520370532b92213cfbf9813704fd45a602 (diff)
Cleanup: use 'e' prefix for enum types
Diffstat (limited to 'source/blender/blenkernel/BKE_customdata.h')
-rw-r--r--source/blender/blenkernel/BKE_customdata.h26
1 files changed, 15 insertions, 11 deletions
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