mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-16 20:17:03 +00:00
CMetroidAreaCollider: Make use of std::array where applicable
Makes arrays strongly typed and allows eliminating some hardcoded array sizes. We can also use it to make input data to some data types and functions significantly more informative. This also makes it easier for static analysis tools to track out of bounds accesses if they ever occur.
This commit is contained in:
@@ -509,7 +509,7 @@ bool CCollidableOBBTree::SphereCollision(const COBBTree::CNode& node, const zeus
|
||||
|
||||
bool CCollidableOBBTree::AABoxCollideWithLeaf(const COBBTree::CLeafData& leaf, const zeus::CTransform& xf,
|
||||
const zeus::CAABox& aabb, const CMaterialList& material,
|
||||
const CMaterialFilter& filter, const zeus::CPlane* planes,
|
||||
const CMaterialFilter& filter, const std::array<zeus::CPlane, 6>& planes,
|
||||
CCollisionInfoList& infoList) const {
|
||||
bool ret = false;
|
||||
zeus::CVector3f center = aabb.center();
|
||||
@@ -538,7 +538,7 @@ bool CCollidableOBBTree::AABoxCollideWithLeaf(const COBBTree::CLeafData& leaf, c
|
||||
bool CCollidableOBBTree::AABoxCollision(const COBBTree::CNode& node, const zeus::CTransform& xf,
|
||||
const zeus::CAABox& aabb, const zeus::COBBox& obb,
|
||||
const CMaterialList& material, const CMaterialFilter& filter,
|
||||
const zeus::CPlane* planes, CCollisionInfoList& infoList) const {
|
||||
const std::array<zeus::CPlane, 6>& planes, CCollisionInfoList& infoList) const {
|
||||
bool ret = false;
|
||||
|
||||
const_cast<CCollidableOBBTree&>(*this).x14_tries += 1;
|
||||
|
||||
Reference in New Issue
Block a user