From 6a03199b50e02d57a50eb24441ef7be0b7e965ac Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 27 Feb 2019 15:07:50 +1100 Subject: 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. --- source/blender/makesdna/DNA_windowmanager_types.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/blender/makesdna/DNA_windowmanager_types.h') diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 42636ab43b9..753c9378797 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -105,7 +105,8 @@ typedef struct ReportList { int printlevel; /** ReportType. */ int storelevel; - int flag, pad; + int flag; + char _pad[4]; struct wmTimer *reporttimer; } ReportList; @@ -240,7 +241,6 @@ typedef struct wmWindow { /** Internal: tag this for extra mousemove event, * makes cursors/buttons active on UI switching. */ short addmousemove; - short pad[4]; /** Winid also in screens, is for retrieving this window after read. */ int winid; @@ -337,7 +337,7 @@ typedef struct wmKeyMapItem { short maptype; /** Unique identifier. Positive for kmi that override builtins, negative otherwise. */ short id; - short pad; + char _pad[2]; /** Rna pointer to access properties. */ struct PointerRNA *ptr; } wmKeyMapItem; @@ -474,7 +474,8 @@ typedef struct wmOperator { struct wmOperator *opm; /** Runtime for drawing. */ struct uiLayout *layout; - short flag, pad[3]; + short flag; + char _pad[6]; } wmOperator; /* operator type return flags: exec(), invoke() modal(), return values */ -- cgit v1.2.3