diff --git a/BGL/include/CGAL/boost/graph/IO/STL.h b/BGL/include/CGAL/boost/graph/IO/STL.h index 7198d8640aa..f2058b59b6e 100644 --- a/BGL/include/CGAL/boost/graph/IO/STL.h +++ b/BGL/include/CGAL/boost/graph/IO/STL.h @@ -172,7 +172,7 @@ bool read_STL(const std::string& fname, { return true; } - g.clear(); + clear(g); } std::ifstream is(fname); CGAL::IO::set_mode(is, CGAL::IO::ASCII); diff --git a/BGL/include/CGAL/boost/graph/IO/polygon_mesh_io.h b/BGL/include/CGAL/boost/graph/IO/polygon_mesh_io.h index d60af3c9949..5934821c4be 100644 --- a/BGL/include/CGAL/boost/graph/IO/polygon_mesh_io.h +++ b/BGL/include/CGAL/boost/graph/IO/polygon_mesh_io.h @@ -45,25 +45,25 @@ bool read_polygon_mesh(std::istream& is, ok = read_OFF(is, g, np, false); if(ok) return true; - g.clear(); + clear(g); is.clear();//reset the error state is.seekg (0, is.beg); ok = read_OBJ(is, g, np, false); if(ok) return true; - g.clear(); + clear(g); is.clear(); is.seekg (0, is.beg); ok = read_PLY(is, g, np, false); if(ok) return true; - g.clear(); + clear(g); is.clear(); is.seekg (0, is.beg); ok = read_STL(is, g, np, false); if(ok) return true; - g.clear(); + clear(g); is.clear(); is.seekg (0, is.beg); ok = read_GOCAD(is, g, np, false); diff --git a/BGL/test/BGL/test_Face_filtered_graph.cpp b/BGL/test/BGL/test_Face_filtered_graph.cpp index 2bab2e1d83c..bc6d1c13880 100644 --- a/BGL/test/BGL/test_Face_filtered_graph.cpp +++ b/BGL/test/BGL/test_Face_filtered_graph.cpp @@ -489,7 +489,7 @@ void test_invalid_selections() assert(pinched_fg.is_selection_valid()); // this creates a non-manifold vertex (multiple umbrellas) - clear(mesh); + CGAL::clear(mesh); read_a_mesh(mesh, "data/genus3.off"); assert(is_valid_polygon_mesh(mesh)); diff --git a/BGL/test/BGL/test_bgl_read_write.cpp b/BGL/test/BGL/test_bgl_read_write.cpp index 694c8a9933f..962a53ba541 100644 --- a/BGL/test/BGL/test_bgl_read_write.cpp +++ b/BGL/test/BGL/test_bgl_read_write.cpp @@ -122,7 +122,7 @@ void test_bgl_OFF(const std::string filename) assert(ok); assert(num_vertices(fg) != 0 && num_faces(fg) != 0); is.close(); - fg.clear(); + CGAL::clear(fg); is.open(filename, std::ios::binary); ok = CGAL::IO::read_OFF(is, fg); @@ -286,7 +286,7 @@ void test_bgl_OFF(const std::string filename) for(auto f : faces(fg)) assert(get(fcm2, f) != CGAL::IO::Color()); - fg.clear(); + CGAL::clear(fg); is.close(); is.open("data/full.off"); @@ -478,7 +478,7 @@ void test_bgl_PLY(const std::string filename, assert(filename != CGAL::data_file_path("meshes/colored_tetra.ply") || (num_vertices(fg) == 4 && num_faces(fg) == 4)); if(!binary) { - fg.clear(); + CGAL::clear(fg); is.open(filename, std::ios::binary); bool ok = CGAL::IO::read_PLY(is, fg, CGAL::parameters::use_binary_mode(false)); is.close(); @@ -711,7 +711,6 @@ void test_bgl_GOCAD(const char* filename) assert(num_vertices(fg) != 0 && num_faces(fg) != 0); is.seekg(0); - fg.clear(); CGAL::clear(fg); std::pair name_and_color; ok = CGAL::IO::read_GOCAD(is, name_and_color, fg); diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/cc_compatible_orientations.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/cc_compatible_orientations.cpp index 8a47239c5aa..ceba3dfb22a 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/cc_compatible_orientations.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/cc_compatible_orientations.cpp @@ -43,7 +43,7 @@ void create_mesh_with_cc_to_orient(Mesh& mesh) } // load the soup into the mesh; - mesh.clear(); + CGAL::clear(mesh); PMP::polygon_soup_to_polygon_mesh(points, triangles, mesh); }