From 25c45b2b284c252c8b341d20f159e5feba408818 Mon Sep 17 00:00:00 2001 From: Lioncache Date: Sat, 6 Dec 2025 18:31:32 -0500 Subject: [PATCH] CSceneNode: Make use of structured bindings in RayAABoxIntersectTest() Same thing, but lets the returned values have more self-explanatory names. --- src/Core/Scene/CSceneNode.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Core/Scene/CSceneNode.cpp b/src/Core/Scene/CSceneNode.cpp index e06c17e8..eb91606a 100644 --- a/src/Core/Scene/CSceneNode.cpp +++ b/src/Core/Scene/CSceneNode.cpp @@ -39,10 +39,10 @@ void CSceneNode::DrawSelection() void CSceneNode::RayAABoxIntersectTest(CRayCollisionTester& rTester, const SViewInfo& /*rkViewInfo*/) { // Default implementation for virtual function - std::pair Result = AABox().IntersectsRay(rTester.Ray()); + const auto [hit, distance] = AABox().IntersectsRay(rTester.Ray()); - if (Result.first) - rTester.AddNode(this, -1, Result.second); + if (hit) + rTester.AddNode(this, -1, distance); } bool CSceneNode::IsVisible() const