diff --git a/source/blender/blenlib/intern/boxpack_2d.cc b/source/blender/blenlib/intern/boxpack_2d.cc index f7a9f3cb0e1..623393832eb 100644 --- a/source/blender/blenlib/intern/boxpack_2d.cc +++ b/source/blender/blenlib/intern/boxpack_2d.cc @@ -20,10 +20,6 @@ #include "BLI_strict_flags.h" /* IWYU pragma: keep. Keep last. */ -#ifdef __GNUC__ -# pragma GCC diagnostic error "-Wpadded" -#endif - /* de-duplicate as we pack */ #define USE_MERGE /* use strip-free */ @@ -38,11 +34,14 @@ struct BoxVert { float x; float y; - int free : 8; /* vert status */ - uint used : 1; - uint _pad : 23; + int free; /* vert status */ + bool used; uint index; +#ifdef USE_PACK_BIAS + float bias; +#endif + BoxPack *trb; /* top right box */ BoxPack *blb; /* bottom left box */ BoxPack *brb; /* bottom right box */ @@ -51,17 +50,8 @@ struct BoxVert { /* Store last intersecting boxes here * speedup intersection testing */ BoxPack *isect_cache[4]; - -#ifdef USE_PACK_BIAS - float bias; - int _pad2; -#endif }; -#ifdef __GNUC__ -# pragma GCC diagnostic ignored "-Wpadded" -#endif - /* free vert flags */ #define EPSILON 0.0000001f #define EPSILON_MERGE 0.00001f @@ -459,7 +449,7 @@ void BLI_box_pack_2d( tot_y = max_ff(box_ymax_get(box), tot_y); /* Place the box */ - vert->free &= (signed char)~quad_flag(j); + vert->free &= ~quad_flag(j); switch (j) { case TR: