diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h index 22c77a23e70..7492c34eeef 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -430,9 +429,10 @@ compute_vertex_normal_most_visible_min_circle(typename boost::graph_traits circum_points; - circum_points.push_back(incident_faces[0]); - circum_points.push_back(incident_faces[1]); + std::array circum_points; + short int circum_points_size=2; + circum_points[0]=incident_faces[0]; + circum_points[1]=incident_faces[1]; // Get the farthest point from circum_points[0] const Vector_ref n0 = get(face_normals, circum_points[0]); @@ -455,10 +455,10 @@ compute_vertex_normal_most_visible_min_circle(typename boost::graph_traits sp_3(center_ni_nj, ni2)){ - circum_points.pop_back(); + circum_points_size=2; } else if(sp_3(center_ni_nk, nj2) > sp_3(center_ni_nk, ni2)){ std::swap(circum_points[1],circum_points[2]); - circum_points.pop_back(); + circum_points_size=2; } else if(sp_3(center_nj_nk, ni2) > sp_3(center_nj_nk, nj2)){ std::swap(circum_points[0],circum_points[2]); - circum_points.pop_back(); + circum_points_size=2; } } }