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_lightprobe_types.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'source/blender/makesdna/DNA_lightprobe_types.h') diff --git a/source/blender/makesdna/DNA_lightprobe_types.h b/source/blender/makesdna/DNA_lightprobe_types.h index 15322374532..d9fd22c51c8 100644 --- a/source/blender/makesdna/DNA_lightprobe_types.h +++ b/source/blender/makesdna/DNA_lightprobe_types.h @@ -66,7 +66,7 @@ typedef struct LightProbe { int grid_resolution_x; int grid_resolution_y; int grid_resolution_z; - int pad1; + char _pad1[4]; /** Object to use as a parallax origin. */ struct Object *parallax_ob; @@ -77,7 +77,7 @@ typedef struct LightProbe { /* Runtime display data */ float distfalloff, distgridinf; - float pad[2]; + char _pad[8]; } LightProbe; /* Probe->type */ @@ -119,7 +119,6 @@ typedef struct LightProbeCache { float position[3], parallax_type; float attenuation_fac; float attenuation_type; - float pad3[2]; float attenuationmat[4][4]; float parallaxmat[4][4]; } LightProbeCache; @@ -132,8 +131,8 @@ typedef struct LightGridCache { /** World space vector between 2 opposite cells. */ float increment_x[3], attenuation_bias; float increment_y[3], level_bias; - float increment_z[3], pad4; - float visibility_bias, visibility_bleed, visibility_range, pad5; + float increment_z[3]; + float visibility_bias, visibility_bleed, visibility_range; } LightGridCache; /* ------ Eevee Lightcache ------- */ @@ -145,7 +144,7 @@ typedef struct LightCacheTexture { int tex_size[3]; char data_type; char components; - char pad[2]; + char _pad[2]; } LightCacheTexture; typedef struct LightCache { @@ -157,7 +156,7 @@ typedef struct LightCache { int mips_len; /** Size of a visibility/reflection sample. */ int vis_res, ref_res; - int pad[2]; + char _pad[4][2]; /* In the future, we could create a bigger texture containing * multiple caches (for animation) and interpolate between the * caches overtime to another texture. */ -- cgit v1.2.3