From 79f4866365bb5169f91c4114e8bbf59ea4148b3d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 21 Jun 2020 02:40:25 -0400 Subject: [PATCH] CDamageableTriggerExtra: Make use of structured bindings --- src/Core/ScriptExtra/CDamageableTriggerExtra.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Core/ScriptExtra/CDamageableTriggerExtra.cpp b/src/Core/ScriptExtra/CDamageableTriggerExtra.cpp index 7400c472..0b77d850 100644 --- a/src/Core/ScriptExtra/CDamageableTriggerExtra.cpp +++ b/src/Core/ScriptExtra/CDamageableTriggerExtra.cpp @@ -270,12 +270,12 @@ void CDamageableTriggerExtra::RayAABoxIntersectTest(CRayCollisionTester& rTester } } - std::pair Result = AABox().IntersectsRay(rkRay); + const auto [intersects, distance] = AABox().IntersectsRay(rkRay); - if (Result.first) + if (intersects) { - rTester.AddNode(this, UINT32_MAX, Result.second); - mCachedRayDistance = Result.second; + rTester.AddNode(this, UINT32_MAX, distance); + mCachedRayDistance = distance; } }