mirror of https://github.com/CGAL/cgal
Fix some warnings
This commit is contained in:
parent
d80d2eebc8
commit
493f034fda
|
|
@ -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_Properties.cpp")
|
||||||
|
|
||||||
create_single_source_cgal_program("test_wrl.cpp")
|
|
||||||
|
|
||||||
create_single_source_cgal_program(
|
create_single_source_cgal_program(
|
||||||
"bench_read_from_stream_vs_add_face_and_add_faces.cpp")
|
"bench_read_from_stream_vs_add_face_and_add_faces.cpp")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ mesh, which includes point location and self intersection tests.
|
||||||
\subsection PMPIO Reading and Writing Polygon Meshes
|
\subsection PMPIO Reading and Writing Polygon Meshes
|
||||||
|
|
||||||
In all functions of this package, the polygon meshes are required to be models
|
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.
|
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.
|
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()`,
|
In addition, this package offers the function `CGAL::Polygon_mesh_processing::read_polygon_mesh()`,
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ bool read_OFF(std::istream& is,
|
||||||
typedef typename CGAL::Kernel_traits<Point>::Kernel Kernel;
|
typedef typename CGAL::Kernel_traits<Point>::Kernel Kernel;
|
||||||
typedef typename Kernel::Point_2 Texture;
|
typedef typename Kernel::Point_2 Texture;
|
||||||
typedef typename Kernel::Vector_3 Normal;
|
typedef typename Kernel::Vector_3 Normal;
|
||||||
|
typedef typename Kernel::FT FT;
|
||||||
typedef CGAL::Color Color;
|
typedef CGAL::Color Color;
|
||||||
|
|
||||||
if(!is.good()){
|
if(!is.good()){
|
||||||
|
|
@ -90,7 +91,7 @@ bool read_OFF(std::istream& is,
|
||||||
double nx, ny, nz, nw;
|
double nx, ny, nz, nw;
|
||||||
scanner.scan_normal(nx, ny, nz, nw);
|
scanner.scan_normal(nx, ny, nz, nw);
|
||||||
CGAL_assertion(nw != 0);
|
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())
|
if(scanner.has_colors())
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <CGAL/IO/read_xyz_points.h>
|
#include <CGAL/IO/read_points.h>
|
||||||
#include <CGAL/Random.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";
|
const char* fname = (argc>1) ? argv[1] : "data/blobby.xyz";
|
||||||
|
|
||||||
std::vector<Point_3> points;
|
std::vector<Point_3> points;
|
||||||
std::ifstream stream(fname);
|
if (!CGAL::read_points(fname, std::back_inserter(points)))
|
||||||
if (!stream ||
|
|
||||||
!CGAL::read_xyz_points(stream, std::back_inserter(points)))
|
|
||||||
{
|
{
|
||||||
std::cerr << "Error: cannot read file " << fname << std::endl;
|
std::cerr << "Error: cannot read file " << fname << std::endl;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
|
||||||
|
|
@ -333,7 +333,7 @@ int main(int argc, char* argv[])
|
||||||
std::vector<Point_3> points;
|
std::vector<Point_3> points;
|
||||||
std::ifstream stream(fname);
|
std::ifstream stream(fname);
|
||||||
if (!stream ||
|
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;
|
std::cerr << "Error: cannot read file " << fname << std::endl;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue