diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h index 06ddc868f0d..98a80e05a8e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h @@ -42,6 +42,8 @@ template class Refine_Polyhedron_3 { //// typedefs typedef typename boost::property_traits::value_type Point_3; + typedef typename boost::property_traits::reference Point_3_ref; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::face_descriptor face_descriptor; @@ -88,7 +90,6 @@ private: bool relax(halfedge_descriptor h) { #ifdef CGAL_PMP_REFINE_DEBUG_PP - typedef typename boost::property_traits::reference Point_3_ref; Point_3_ref p = get(vpmap, source(h,pmesh)); Point_3_ref q = get(vpmap, target(h,pmesh)); Point_3_ref r = get(vpmap, target(next(h,pmesh),pmesh)); @@ -227,7 +228,7 @@ private: const std::set& interior_map, bool accept_internal_facets) { - const Point_3& vp = get(vpmap, vh); + const Point_3_ref vp = get(vpmap, vh); Halfedge_around_target_circulator circ(halfedge(vh,pmesh),pmesh), done(circ); int deg = 0; double sum = 0; @@ -239,7 +240,7 @@ private: { continue; } // which means current edge is an interior edge and should not be included in scale attribute calculation } - const Point_3& vq = get(vpmap, target(opposite(*circ,pmesh),pmesh)); + const Point_3_ref vq = get(vpmap, target(opposite(*circ,pmesh),pmesh)); sum += to_double(CGAL::approximate_sqrt(CGAL::squared_distance(vp, vq))); ++deg; } while(++circ != done);