From 178e7a89a57b4d0fb59cc84f37f94613859cdceb Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Tue, 7 Feb 2012 13:45:10 +0000 Subject: [PATCH] replaced Object --- .../CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h index 936242c67c1..f2f2784b829 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h @@ -16,6 +16,8 @@ // // Author(s) : Idit Haran // Ron Wein +// Efi Fogel + #ifndef CGAL_ARR_LANDMARKS_NEAREST_NEIGHBOR_H #define CGAL_ARR_LANDMARKS_NEAREST_NEIGHBOR_H @@ -215,10 +217,9 @@ public: // query the search tree to find the nearest landmark point. NN_Point_2 nn_query(q); Neighbor_search search(*m_tree, nn_query, 1); - //const NN_Point_2& nearest_p = search.begin()->first; - NN_Point_2 nearest_p = search.begin()->first; - // Return the search result. + // For some reason search.begin()->first fails + const NN_Point_2& nearest_p = (*(search.begin())).first; obj = nearest_p.object(); return nearest_p.point(); }