mirror of https://github.com/CGAL/cgal
Fix warnings
This commit is contained in:
parent
d982483431
commit
fd49c82abd
|
|
@ -56,7 +56,7 @@ int readINT8little(FILE *f, CGAL_INT8 *i)
|
||||||
|
|
||||||
rc = fgetc(f);
|
rc = fgetc(f);
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return rc;
|
return EOF;
|
||||||
|
|
||||||
*i = CGAL_INT8(rc & 0xff);
|
*i = CGAL_INT8(rc & 0xff);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -69,7 +69,7 @@ int readUINT8little(FILE *f, CGAL_UINT8 *i)
|
||||||
|
|
||||||
rc = fgetc(f);
|
rc = fgetc(f);
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return rc;
|
return EOF;
|
||||||
|
|
||||||
*i = CGAL_UINT8(rc & 0xff);
|
*i = CGAL_UINT8(rc & 0xff);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -91,7 +91,7 @@ int readINT16little(FILE *f, CGAL_INT16 *i)
|
||||||
|
|
||||||
rc = fgetc(f);
|
rc = fgetc(f);
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return rc;
|
return EOF;
|
||||||
|
|
||||||
temp = temp | CGAL_INT16((rc & 0xff) << 8);
|
temp = temp | CGAL_INT16((rc & 0xff) << 8);
|
||||||
*i = temp;
|
*i = temp;
|
||||||
|
|
@ -108,7 +108,7 @@ int readUINT16little(FILE *f, CGAL_UINT16 *i)
|
||||||
|
|
||||||
rc = fgetc(f);
|
rc = fgetc(f);
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return rc;
|
return EOF;
|
||||||
|
|
||||||
temp = CGAL_INT16(temp | ((rc & 0xff) << 8));
|
temp = CGAL_INT16(temp | ((rc & 0xff) << 8));
|
||||||
*i = temp;
|
*i = temp;
|
||||||
|
|
@ -132,7 +132,7 @@ int readINT32little(FILE *f, CGAL_INT32 *i)
|
||||||
|
|
||||||
rc = fgetc(f);
|
rc = fgetc(f);
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return rc;
|
return EOF;
|
||||||
|
|
||||||
temp = CGAL_INT32(temp | (((long)rc & 0xff) << 24));
|
temp = CGAL_INT32(temp | (((long)rc & 0xff) << 24));
|
||||||
*i = temp;
|
*i = temp;
|
||||||
|
|
@ -151,7 +151,7 @@ int readUINT32little(FILE *f, CGAL_UINT32 *i)
|
||||||
|
|
||||||
rc = fgetc(f);
|
rc = fgetc(f);
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return rc;
|
return EOF;
|
||||||
|
|
||||||
temp = CGAL_UINT32(temp | (((long)rc & 0xff) << 24));
|
temp = CGAL_UINT32(temp | (((long)rc & 0xff) << 24));
|
||||||
*i = temp;
|
*i = temp;
|
||||||
|
|
@ -185,7 +185,7 @@ int writeINT16little(FILE *f, CGAL_INT16 i)
|
||||||
|
|
||||||
rc = fputc((i & 0xff), f);
|
rc = fputc((i & 0xff), f);
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return rc;
|
return EOF;
|
||||||
|
|
||||||
return fputc(((i >> 8) & 0xff), f);
|
return fputc(((i >> 8) & 0xff), f);
|
||||||
}
|
}
|
||||||
|
|
@ -197,7 +197,7 @@ int writeUINT16little(FILE *f, CGAL_UINT16 i)
|
||||||
|
|
||||||
rc = fputc((i & 0xff), f);
|
rc = fputc((i & 0xff), f);
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return rc;
|
return EOF;
|
||||||
|
|
||||||
return fputc(((i >> 8) & 0xff), f);
|
return fputc(((i >> 8) & 0xff), f);
|
||||||
}
|
}
|
||||||
|
|
@ -209,15 +209,15 @@ int writeINT32little(FILE *f, CGAL_INT32 i)
|
||||||
|
|
||||||
rc = fputc((i & 0xff), f);
|
rc = fputc((i & 0xff), f);
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return rc;
|
return EOF;
|
||||||
|
|
||||||
rc = fputc(((i >> 8) & 0xff), f);
|
rc = fputc(((i >> 8) & 0xff), f);
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return rc;
|
return EOF;
|
||||||
|
|
||||||
rc = fputc(((i >> 16) & 0xff), f);
|
rc = fputc(((i >> 16) & 0xff), f);
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return rc;
|
return EOF;
|
||||||
|
|
||||||
return fputc(((i >> 24) & 0xff), f);
|
return fputc(((i >> 24) & 0xff), f);
|
||||||
}
|
}
|
||||||
|
|
@ -230,15 +230,15 @@ int writeUINT32little(FILE *f, CGAL_UINT32 i)
|
||||||
|
|
||||||
rc = fputc((i & 0xff), f);
|
rc = fputc((i & 0xff), f);
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return rc;
|
return EOF;
|
||||||
|
|
||||||
rc = fputc(((i >> 8) & 0xff), f);
|
rc = fputc(((i >> 8) & 0xff), f);
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return rc;
|
return EOF;
|
||||||
|
|
||||||
rc = fputc(((i >> 16) & 0xff), f);
|
rc = fputc(((i >> 16) & 0xff), f);
|
||||||
if (rc == EOF)
|
if (rc == EOF)
|
||||||
return rc;
|
return EOF;
|
||||||
|
|
||||||
return fputc(((i >> 24) & 0xff), f);
|
return fputc(((i >> 24) & 0xff), f);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
#define CGAL_EPIC_CONVERTER_H
|
#define CGAL_EPIC_CONVERTER_H
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/config.h>
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -54,6 +54,8 @@ class Epic_converter {
|
||||||
typedef typename Exact_predicates_inexact_constructions_kernel::Sphere_3 Sphere_3;
|
typedef typename Exact_predicates_inexact_constructions_kernel::Sphere_3 Sphere_3;
|
||||||
typedef typename Exact_predicates_inexact_constructions_kernel::Circle_3 Circle_3;
|
typedef typename Exact_predicates_inexact_constructions_kernel::Circle_3 Circle_3;
|
||||||
typedef typename Exact_predicates_inexact_constructions_kernel::Iso_cuboid_3 Iso_cuboid_3;
|
typedef typename Exact_predicates_inexact_constructions_kernel::Iso_cuboid_3 Iso_cuboid_3;
|
||||||
|
|
||||||
|
typedef typename IK::FT IK_FT;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -61,6 +63,7 @@ public:
|
||||||
std::pair<double,bool> operator()(const typename IK::FT n) const
|
std::pair<double,bool> operator()(const typename IK::FT n) const
|
||||||
{
|
{
|
||||||
double d;
|
double d;
|
||||||
|
internal::init_double(d, (IK_FT*)(0));
|
||||||
if(fit_in_double(n,d)){
|
if(fit_in_double(n,d)){
|
||||||
return std::make_pair(d,true);
|
return std::make_pair(d,true);
|
||||||
}
|
}
|
||||||
|
|
@ -80,6 +83,7 @@ public:
|
||||||
std::pair<Point_2,bool> operator()(const typename IK::Point_2& p) const
|
std::pair<Point_2,bool> operator()(const typename IK::Point_2& p) const
|
||||||
{
|
{
|
||||||
double x, y;
|
double x, y;
|
||||||
|
internal::init_double(x, y, (IK_FT*)(0));
|
||||||
if(fit_in_double(p.x(),x) && fit_in_double(p.y(),y)){
|
if(fit_in_double(p.x(),x) && fit_in_double(p.y(),y)){
|
||||||
return std::make_pair(Point_2(x,y),true);
|
return std::make_pair(Point_2(x,y),true);
|
||||||
}
|
}
|
||||||
|
|
@ -89,6 +93,7 @@ public:
|
||||||
std::pair<Vector_2,bool> operator()(const typename IK::Vector_2& v) const
|
std::pair<Vector_2,bool> operator()(const typename IK::Vector_2& v) const
|
||||||
{
|
{
|
||||||
double x, y;
|
double x, y;
|
||||||
|
internal::init_double(x, y, (IK_FT*)(0));
|
||||||
if(fit_in_double(v.x(),x) && fit_in_double(v.y(),y)){
|
if(fit_in_double(v.x(),x) && fit_in_double(v.y(),y)){
|
||||||
return std::make_pair(Vector_2(x,y),true);
|
return std::make_pair(Vector_2(x,y),true);
|
||||||
}
|
}
|
||||||
|
|
@ -98,6 +103,7 @@ public:
|
||||||
std::pair<Direction_2,bool> operator()(const typename IK::Direction_2& d) const
|
std::pair<Direction_2,bool> operator()(const typename IK::Direction_2& d) const
|
||||||
{
|
{
|
||||||
double x, y;
|
double x, y;
|
||||||
|
internal::init_double(x, y, (IK_FT*)(0));
|
||||||
if(fit_in_double(d.dx(),x) && fit_in_double(d.dy(),y)){
|
if(fit_in_double(d.dx(),x) && fit_in_double(d.dy(),y)){
|
||||||
return std::make_pair(Direction_2(x,y),true);
|
return std::make_pair(Direction_2(x,y),true);
|
||||||
}
|
}
|
||||||
|
|
@ -266,6 +272,7 @@ public:
|
||||||
std::pair<Point_3,bool> operator()(const typename IK::Point_3& p) const
|
std::pair<Point_3,bool> operator()(const typename IK::Point_3& p) const
|
||||||
{
|
{
|
||||||
double x, y, z;
|
double x, y, z;
|
||||||
|
internal::init_double(x, y, z, (IK_FT*)(0));
|
||||||
if(fit_in_double(p.x(),x) && fit_in_double(p.y(),y) && fit_in_double(p.z(),z)){
|
if(fit_in_double(p.x(),x) && fit_in_double(p.y(),y) && fit_in_double(p.z(),z)){
|
||||||
return std::make_pair(Point_3(x,y,z),true);
|
return std::make_pair(Point_3(x,y,z),true);
|
||||||
}
|
}
|
||||||
|
|
@ -275,6 +282,7 @@ public:
|
||||||
std::pair<Vector_3,bool> operator()(const typename IK::Vector_3& v) const
|
std::pair<Vector_3,bool> operator()(const typename IK::Vector_3& v) const
|
||||||
{
|
{
|
||||||
double x, y, z;
|
double x, y, z;
|
||||||
|
internal::init_double(x, y, z, (IK_FT*)(0));
|
||||||
if(fit_in_double(v.x(),x) && fit_in_double(v.y(),y) && fit_in_double(v.z(),z)){
|
if(fit_in_double(v.x(),x) && fit_in_double(v.y(),y) && fit_in_double(v.z(),z)){
|
||||||
return std::make_pair(Vector_3(x,y,z),true);
|
return std::make_pair(Vector_3(x,y,z),true);
|
||||||
}
|
}
|
||||||
|
|
@ -284,6 +292,7 @@ public:
|
||||||
std::pair<Direction_3,bool> operator()(const typename IK::Direction_3& d) const
|
std::pair<Direction_3,bool> operator()(const typename IK::Direction_3& d) const
|
||||||
{
|
{
|
||||||
double x, y, z;
|
double x, y, z;
|
||||||
|
internal::init_double(x, y, z, (IK_FT*)(0));
|
||||||
if(fit_in_double(d.dx(),x) && fit_in_double(d.dy(),y) && fit_in_double(d.dz(),z)){
|
if(fit_in_double(d.dx(),x) && fit_in_double(d.dy(),y) && fit_in_double(d.dz(),z)){
|
||||||
return std::make_pair(Direction_3(x,y,z),true);
|
return std::make_pair(Direction_3(x,y,z),true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,9 @@ namespace CGAL {
|
||||||
template < typename ET >
|
template < typename ET >
|
||||||
class Lazy_exact_nt;
|
class Lazy_exact_nt;
|
||||||
|
|
||||||
|
template <bool Protected>
|
||||||
|
class Interval_nt;
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
// Utility function to check a posteriori that a subtraction was performed
|
// Utility function to check a posteriori that a subtraction was performed
|
||||||
|
|
@ -152,6 +155,66 @@ template < typename ET >
|
||||||
inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, double&d8, double& d9, double& d10, double& d11, double& d12, double& d13, double& d14, Lazy_exact_nt<ET>* )
|
inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, double&d8, double& d9, double& d10, double& d11, double& d12, double& d13, double& d14, Lazy_exact_nt<ET>* )
|
||||||
{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = d8 = d9 = d10 = d11 = d12 = d13 = d14 = 0;}
|
{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = d8 = d9 = d10 = d11 = d12 = d13 = d14 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, Interval_nt<P>* )
|
||||||
|
{d0 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, double& d1, Interval_nt<P>* )
|
||||||
|
{d0 = d1 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, double& d1, double& d2, Interval_nt<P>* )
|
||||||
|
{d0 = d1 = d2 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, double& d1, double& d2, double& d3, Interval_nt<P>* )
|
||||||
|
{d0 = d1 = d2 = d3 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, Interval_nt<P>* )
|
||||||
|
{d0 = d1 = d2 = d3 = d4 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, Interval_nt<P>* )
|
||||||
|
{d0 = d1 = d2 = d3 = d4 = d5 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, Interval_nt<P>* )
|
||||||
|
{d0 = d1 = d2 = d3 = d4 = d5 = d6 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, Interval_nt<P>* )
|
||||||
|
{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, double& d8, Interval_nt<P>* )
|
||||||
|
{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = d8 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, double&d8, double& d9, Interval_nt<P>* )
|
||||||
|
{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = d8 = d9 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, double&d8, double& d9, double& d10, Interval_nt<P>* )
|
||||||
|
{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = d8 = d9 = d10 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, double&d8, double& d9, double& d10, double& d11, Interval_nt<P>* )
|
||||||
|
{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = d8 = d9 = d10 = d11 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, double&d8, double& d9, double& d10, double& d11, double& d12, Interval_nt<P>* )
|
||||||
|
{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = d8 = d9 = d10 = d11 = d12 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, double&d8, double& d9, double& d10, double& d11, double& d12, double& d13, Interval_nt<P>* )
|
||||||
|
{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = d8 = d9 = d10 = d11 = d12 = d13 = 0;}
|
||||||
|
|
||||||
|
template < bool P >
|
||||||
|
inline void init_double(double& d0, double& d1, double& d2, double& d3, double& d4, double& d5, double& d6, double& d7, double&d8, double& d9, double& d10, double& d11, double& d12, double& d13, double& d14, Interval_nt<P>* )
|
||||||
|
{d0 = d1 = d2 = d3 = d4 = d5 = d6 = d7 = d8 = d9 = d10 = d11 = d12 = d13 = d14 = 0;}
|
||||||
|
|
||||||
|
|
||||||
// Auxiliary function to check if static filters can be applied, that is,
|
// Auxiliary function to check if static filters can be applied, that is,
|
||||||
// if to_double() does not add roundoff errors.
|
// if to_double() does not add roundoff errors.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue