Cleanup: typedef for empty list

Without this the intent isn't clear.
This commit is contained in:
Campbell Barton
2017-05-03 05:20:58 +10:00
parent 1b6c21c03b
commit 85ca3156fc
2 changed files with 7 additions and 3 deletions

View File

@@ -74,7 +74,11 @@ typedef struct DRWInterface DRWInterface;
typedef struct DRWPass DRWPass;
typedef struct DRWShadingGroup DRWShadingGroup;
#define DRW_VIEWPORT_LIST_SIZE(list) (sizeof(list) == sizeof(char) ? 0 : ((sizeof(list)) / sizeof(void *)))
/* declare members as empty (unused) */
typedef char DRWViewportEmptyList;
#define DRW_VIEWPORT_LIST_SIZE(list) \
(sizeof(list) == sizeof(DRWViewportEmptyList) ? 0 : ((sizeof(list)) / sizeof(void *)))
/* Unused members must be either pass list or 'char *' when not usd. */
#define DRW_VIEWPORT_DATA_SIZE(ty) { \

View File

@@ -47,8 +47,8 @@ typedef struct EDIT_ARMATURE_StorageList {
typedef struct EDIT_ARMATURE_Data {
void *engine_type;
char *fbl;
char *txl;
DRWViewportEmptyList *fbl;
DRWViewportEmptyList *txl;
EDIT_ARMATURE_PassList *psl;
EDIT_ARMATURE_StorageList *stl;
} EDIT_ARMATURE_Data;