Fix some warnings

This commit is contained in:
Maxime Gimeno 2020-11-23 11:01:41 +01:00
parent d80d2eebc8
commit 493f034fda
5 changed files with 6 additions and 9 deletions

View File

@ -91,8 +91,6 @@ create_single_source_cgal_program("test_graph_traits.cpp")
create_single_source_cgal_program("test_Properties.cpp")
create_single_source_cgal_program("test_wrl.cpp")
create_single_source_cgal_program(
"bench_read_from_stream_vs_add_face_and_add_faces.cpp")

View File

@ -55,7 +55,7 @@ mesh, which includes point location and self intersection tests.
\subsection PMPIO Reading and Writing Polygon Meshes
In all functions of this package, the polygon meshes are required to be models
of the graph concepts defined in the package \PkgBGLRef. Using common graph concepts
of the graph concepts defined in the package \ref PkgBGLRef. Using common graph concepts
enables having common input/output functions for all the models of these concepts.
The page \ref PkgBGLIOFct provides an exhaustive description of the available I/O functions.
In addition, this package offers the function `CGAL::Polygon_mesh_processing::read_polygon_mesh()`,

View File

@ -64,6 +64,7 @@ bool read_OFF(std::istream& is,
typedef typename CGAL::Kernel_traits<Point>::Kernel Kernel;
typedef typename Kernel::Point_2 Texture;
typedef typename Kernel::Vector_3 Normal;
typedef typename Kernel::FT FT;
typedef CGAL::Color Color;
if(!is.good()){
@ -90,7 +91,7 @@ bool read_OFF(std::istream& is,
double nx, ny, nz, nw;
scanner.scan_normal(nx, ny, nz, nw);
CGAL_assertion(nw != 0);
*vn_out++ = Normal(nx, ny, nz, nw);
*vn_out++ = Normal(FT(nx), FT(ny), FT(nz), FT(nw));
}
if(scanner.has_colors())

View File

@ -7,7 +7,7 @@
#include <fstream>
#include <string>
#include <CGAL/IO/read_xyz_points.h>
#include <CGAL/IO/read_points.h>
#include <CGAL/Random.h>
@ -25,9 +25,7 @@ int main(int argc, char* argv[])
const char* fname = (argc>1) ? argv[1] : "data/blobby.xyz";
std::vector<Point_3> points;
std::ifstream stream(fname);
if (!stream ||
!CGAL::read_xyz_points(stream, std::back_inserter(points)))
if (!CGAL::read_points(fname, std::back_inserter(points)))
{
std::cerr << "Error: cannot read file " << fname << std::endl;
return EXIT_FAILURE;

View File

@ -333,7 +333,7 @@ int main(int argc, char* argv[])
std::vector<Point_3> points;
std::ifstream stream(fname);
if (!stream ||
!CGAL::read_xyz_points(stream, std::back_inserter(points)))
!CGAL::read_XYZ(stream, std::back_inserter(points)))
{
std::cerr << "Error: cannot read file " << fname << std::endl;
return EXIT_FAILURE;