From 6e7e7611262ce91107a9e3af97886b08cb89a4ab Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 6 Apr 2020 07:11:31 -0400 Subject: [PATCH] CCollidableOBBTree: Don't cast away const in constructor Same behavior, minus a cast. --- Runtime/Collision/CCollidableOBBTree.cpp | 2 +- Runtime/Collision/CCollidableOBBTree.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/Collision/CCollidableOBBTree.cpp b/Runtime/Collision/CCollidableOBBTree.cpp index 2b67d0506..9d2fbd758 100644 --- a/Runtime/Collision/CCollidableOBBTree.cpp +++ b/Runtime/Collision/CCollidableOBBTree.cpp @@ -12,7 +12,7 @@ namespace urde { u32 CCollidableOBBTree::sTableIndex = 0; CCollidableOBBTree::CCollidableOBBTree(const COBBTree* tree, const urde::CMaterialList& material) -: CCollisionPrimitive(material), x10_tree((COBBTree*)tree) {} +: CCollisionPrimitive(material), x10_tree(tree) {} bool CCollidableOBBTree::LineIntersectsLeaf(const COBBTree::CLeafData& leaf, CRayCastInfo& info) const { bool ret = false; diff --git a/Runtime/Collision/CCollidableOBBTree.hpp b/Runtime/Collision/CCollidableOBBTree.hpp index 25993d3c2..9a8f58e9d 100644 --- a/Runtime/Collision/CCollidableOBBTree.hpp +++ b/Runtime/Collision/CCollidableOBBTree.hpp @@ -31,7 +31,7 @@ public: class CCollidableOBBTree : public CCollisionPrimitive { friend class CCollidableOBBTreeGroup; - COBBTree* x10_tree = nullptr; + const COBBTree* x10_tree = nullptr; u32 x14_tries = 0; u32 x18_misses = 0; u32 x1c_hits = 0;