From f83b970e75027952a2aa315578705a52a5fc484f Mon Sep 17 00:00:00 2001 From: Luke Street Date: Fri, 10 Apr 2020 15:03:24 -0400 Subject: [PATCH] Runtime/Collision: Replace bitfield unions with constructor initializers --- Runtime/Collision/CMetroidAreaCollider.hpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Runtime/Collision/CMetroidAreaCollider.hpp b/Runtime/Collision/CMetroidAreaCollider.hpp index 7f34f557c..97a0a9e6d 100644 --- a/Runtime/Collision/CMetroidAreaCollider.hpp +++ b/Runtime/Collision/CMetroidAreaCollider.hpp @@ -173,16 +173,12 @@ public: class CAreaCollisionCache { zeus::CAABox x0_aabb; rstl::reserved_vector x18_leafCaches; - union { - struct { - bool x1b40_24_leafOverflow : 1; - bool x1b40_25_cacheOverflow : 1; - }; - u32 _dummy = 0; - }; + bool x1b40_24_leafOverflow : 1; + bool x1b40_25_cacheOverflow : 1; 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(); const zeus::CAABox& GetCacheBounds() const { return x0_aabb; } void SetCacheBounds(const zeus::CAABox& aabb) { x0_aabb = aabb; }