diff --git a/Runtime/Collision/CCollisionEdge.hpp b/Runtime/Collision/CCollisionEdge.hpp index d60a37dc6..7c976a058 100644 --- a/Runtime/Collision/CCollisionEdge.hpp +++ b/Runtime/Collision/CCollisionEdge.hpp @@ -8,14 +8,14 @@ class CCollisionEdge { u16 x2_index2 = -1; public: - CCollisionEdge() = default; + constexpr CCollisionEdge() noexcept = default; explicit CCollisionEdge(CInputStream&); - CCollisionEdge(u16 v0, u16 v1) : x0_index1(v0), x2_index2(v1) {} + constexpr CCollisionEdge(u16 v0, u16 v1) noexcept : x0_index1(v0), x2_index2(v1) {} - u16 GetVertIndex1() const { return x0_index1; } - u16 GetVertIndex2() const { return x2_index2; } + [[nodiscard]] constexpr u16 GetVertIndex1() const noexcept { return x0_index1; } + [[nodiscard]] constexpr u16 GetVertIndex2() const noexcept { return x2_index2; } - void swapBig() { + constexpr void swapBig() noexcept { x0_index1 = hecl::SBig(x0_index1); x2_index2 = hecl::SBig(x2_index2); } diff --git a/Runtime/Collision/COBBTree.cpp b/Runtime/Collision/COBBTree.cpp index 74fa030dc..4d96259ca 100644 --- a/Runtime/Collision/COBBTree.cpp +++ b/Runtime/Collision/COBBTree.cpp @@ -14,7 +14,7 @@ constexpr std::array DefaultSurfaceMaterials{ 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, }; -const std::array DefaultEdges{{ +constexpr std::array DefaultEdges{{ {4, 1}, {1, 5}, {5, 4},