diff --git a/AABB_tree/include/CGAL/AABB_traits.h b/AABB_tree/include/CGAL/AABB_traits.h index 84c8620118d..2005febfe71 100644 --- a/AABB_tree/include/CGAL/AABB_traits.h +++ b/AABB_tree/include/CGAL/AABB_traits.h @@ -160,8 +160,6 @@ struct AABB_traits_base_2{ return FT(0.); else return t_near; - return boost::none; - } } }; diff --git a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_ray_intersection.h b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_ray_intersection.h index a014810e2cf..04ddf1f2c05 100644 --- a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_ray_intersection.h +++ b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_ray_intersection.h @@ -171,8 +171,14 @@ private: FT operator()(const Point& point) { typename AABB_traits::Geom_traits::Vector_3 x(ray->source(), point); typename AABB_traits::Geom_traits::Vector_3 v = ray->to_vector(); - boost::array xv = {x[0] / v[0], x[1] / v[1], x[2] / v[2]}; - return *std::max_element(xv.begin(), xv.end()); + FT dist = 0; + + for(int i = 0; i < 3; ++i) { + if(v[0] != 0) { + dist = std::max(dist, x[0] / v[0]); + } + } + return dist; } const Ray* ray;