2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 23:07:43 +00:00

CCollisionSurface: Return std::array by reference from GetVerts()

Same behavior, facilitates better static analysis for out-of-bounds
accesses, and also even allows size querying if necessary.
This commit is contained in:
Lioncash
2020-04-06 06:02:49 -04:00
parent ecf3cfdb49
commit c97fedd989
5 changed files with 16 additions and 12 deletions

View File

@@ -199,8 +199,8 @@ static zeus::CVector3f ClipRayToPlane(const zeus::CVector3f& a, const zeus::CVec
return (1.f - -plane.pointToPlaneDist(a) / (b - a).dot(plane.normal())) * (a - b) + b;
}
bool CMetroidAreaCollider::ConvexPolyCollision(const std::array<zeus::CPlane, 6>& planes, const zeus::CVector3f* verts,
zeus::CAABox& aabb) {
bool CMetroidAreaCollider::ConvexPolyCollision(const std::array<zeus::CPlane, 6>& planes,
const std::array<zeus::CVector3f, 3>& verts, zeus::CAABox& aabb) {
std::array<rstl::reserved_vector<zeus::CVector3f, 20>, 2> vecs;
g_CalledClip += 1;