CDamageableTriggerExtra: Make use of structured bindings

This commit is contained in:
Lioncash 2020-06-21 02:40:25 -04:00
parent 8c3f77df8a
commit 79f4866365
1 changed files with 4 additions and 4 deletions

View File

@ -270,12 +270,12 @@ void CDamageableTriggerExtra::RayAABoxIntersectTest(CRayCollisionTester& rTester
} }
} }
std::pair<bool,float> Result = AABox().IntersectsRay(rkRay); const auto [intersects, distance] = AABox().IntersectsRay(rkRay);
if (Result.first) if (intersects)
{ {
rTester.AddNode(this, UINT32_MAX, Result.second); rTester.AddNode(this, UINT32_MAX, distance);
mCachedRayDistance = Result.second; mCachedRayDistance = distance;
} }
} }