diff --git a/tests/RayTests.cpp b/tests/RayTests.cpp index 11b0060..0f25abd 100644 --- a/tests/RayTests.cpp +++ b/tests/RayTests.cpp @@ -63,10 +63,10 @@ TEST_CASE("RaySphereIntersection") REQUIRE(ray.IntersectSphere(Vector3f(0), 1, h1, h2) == 1); REQUIRE(h1 == h2); ::CompareVec3Approx(h1.normal, h1.point); - const auto& value = ray.IntersectSphere(Vector3f(0), 1).value(); - REQUIRE(value.distance == h1.distance); - ::CompareVec3Approx(value.normal, h1.normal); - ::CompareVec3Approx(value.point, h1.point); + auto value = ray.IntersectSphere(Vector3f(0), 1); + REQUIRE(value->distance == h1.distance); + ::CompareVec3Approx(value->normal, h1.normal); + ::CompareVec3Approx(value->point, h1.point); } // ray intersects sphere behind the origin {