diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-27 07:07:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-27 07:09:48 +0300 |
commit | 6a03199b50e02d57a50eb24441ef7be0b7e965ac (patch) | |
tree | a5e5374cb81742d2c2df05ecf315afaafcaf3d0e /source/blender/makesdna/DNA_meshdata_types.h | |
parent | ea69d9858058e027a8b49d0cf313c8d4abb777a4 (diff) |
Cleanup: use '_pad' convention for padding in all DNA structs
Avoids mixing these in with regular variables in code-completion.
Use char for pad members except for 'void *', to make size clearer.
Removed/shrink a few redundant padding vars which were >= 8 bytes.
Diffstat (limited to 'source/blender/makesdna/DNA_meshdata_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_meshdata_types.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index cb28b1bfbdf..9ed879d10c5 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -75,7 +75,7 @@ typedef struct MPoly { /** Keep signed since we need to subtract when getting the previous loop. */ int totloop; short mat_nr; - char flag, pad; + char flag, _pad; } MPoly; /* the e here is because we want to move away from relying on edge hashes.*/ @@ -184,7 +184,7 @@ typedef struct MVertTri { } MVertTri; //typedef struct MTexPoly { -// void *pad; +// void *_pad; //} MTexPoly; typedef struct MLoopUV { @@ -290,7 +290,7 @@ typedef struct MultiresColFace { typedef struct MultiresFace { unsigned int v[4]; unsigned int mid; - char flag, mat_nr, pad[2]; + char flag, mat_nr, _pad[2]; } MultiresFace; typedef struct MultiresEdge { @@ -305,7 +305,8 @@ typedef struct MultiresLevel { MultiresColFace *colfaces; MultiresEdge *edges; - unsigned int totvert, totface, totedge, pad; + unsigned int totvert, totface, totedge; + char _pad[4]; /* Kept for compatibility with even older files */ MVert *verts; @@ -338,7 +339,7 @@ typedef struct GridPaintMask { /* The maximum multires level associated with this grid */ unsigned int level; - int pad; + char _pad[4]; } GridPaintMask; typedef enum eMVertSkinFlag { @@ -364,7 +365,7 @@ typedef struct MVertSkin { typedef struct FreestyleEdge { char flag; - char pad[3]; + char _pad[3]; } FreestyleEdge; /* FreestyleEdge->flag */ @@ -374,7 +375,7 @@ enum { typedef struct FreestyleFace { char flag; - char pad[3]; + char _pad[3]; } FreestyleFace; /* FreestyleFace->flag */ |