Runtime/Collision: Replace bitfield unions with constructor initializers

This commit is contained in:
Luke Street 2020-04-10 15:03:24 -04:00
parent 4a3ce8453f
commit f83b970e75
1 changed files with 4 additions and 8 deletions

View File

@ -173,16 +173,12 @@ public:
class CAreaCollisionCache { class CAreaCollisionCache {
zeus::CAABox x0_aabb; zeus::CAABox x0_aabb;
rstl::reserved_vector<CMetroidAreaCollider::COctreeLeafCache, 3> x18_leafCaches; rstl::reserved_vector<CMetroidAreaCollider::COctreeLeafCache, 3> x18_leafCaches;
union { bool x1b40_24_leafOverflow : 1;
struct { bool x1b40_25_cacheOverflow : 1;
bool x1b40_24_leafOverflow : 1;
bool x1b40_25_cacheOverflow : 1;
};
u32 _dummy = 0;
};
public: public:
explicit CAreaCollisionCache(const zeus::CAABox& aabb) : x0_aabb(aabb) {} explicit CAreaCollisionCache(const zeus::CAABox& aabb)
: x0_aabb(aabb), x1b40_24_leafOverflow(false), x1b40_25_cacheOverflow(false) {}
void ClearCache(); void ClearCache();
const zeus::CAABox& GetCacheBounds() const { return x0_aabb; } const zeus::CAABox& GetCacheBounds() const { return x0_aabb; }
void SetCacheBounds(const zeus::CAABox& aabb) { x0_aabb = aabb; } void SetCacheBounds(const zeus::CAABox& aabb) { x0_aabb = aabb; }