mirror of https://github.com/CGAL/cgal
Merge pull request #6109 from afabri/CGAL-VC_max_warning-GF
PMP: Fix Warnings in Master
This commit is contained in:
commit
3e877fa124
|
|
@ -202,7 +202,7 @@ public:
|
||||||
// Invalid arc:
|
// Invalid arc:
|
||||||
if (dir_res == EQUAL) return;
|
if (dir_res == EQUAL) return;
|
||||||
|
|
||||||
this->_info = (Conic_arc_2::IS_VALID | DEGREE_1);
|
this->_info = (static_cast<int>(Conic_arc_2::IS_VALID) | static_cast<int>(DEGREE_1));
|
||||||
if (dir_res == SMALLER)
|
if (dir_res == SMALLER)
|
||||||
this->_info = (this->_info | IS_DIRECTED_RIGHT);
|
this->_info = (this->_info | IS_DIRECTED_RIGHT);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,7 @@ inline std::string BigFloatRep::toString(long prec, bool sci) const {
|
||||||
else
|
else
|
||||||
return r.rep;
|
return r.rep;
|
||||||
}
|
}
|
||||||
return nullptr;
|
return std::string();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void BigFloatRep::dump() const {
|
inline void BigFloatRep::dump() const {
|
||||||
|
|
|
||||||
|
|
@ -27,11 +27,11 @@
|
||||||
|
|
||||||
#if defined(__has_include)
|
#if defined(__has_include)
|
||||||
# if CGAL_USE_GMP && ! __has_include(<gmp.h>)
|
# if CGAL_USE_GMP && ! __has_include(<gmp.h>)
|
||||||
# warning "<gmp.h> cannot be found. Less efficient number types will be used instead. Define CGAL_NO_GMP=1 if that is on purpose."
|
# pragma CGAL_WARNING(<gmp.h> cannot be found. Less efficient number types will be used instead. Define CGAL_NO_GMP=1 if that is on purpose.)
|
||||||
# undef CGAL_USE_GMP
|
# undef CGAL_USE_GMP
|
||||||
# undef CGAL_USE_MPFR
|
# undef CGAL_USE_MPFR
|
||||||
# elif CGAL_USE_MPFR && ! __has_include(<mpfr.h>)
|
# elif CGAL_USE_MPFR && ! __has_include(<mpfr.h>)
|
||||||
# warning "<mpfr.h> cannot be found and the GMP support in CGAL requires it. Less efficient number types will be used instead. Define CGAL_NO_GMP=1 if that is on purpose."
|
# pragma CGAL_WARNING(<mpfr.h> cannot be found and the GMP support in CGAL requires it. Less efficient number types will be used instead. Define CGAL_NO_GMP=1 if that is on purpose.)
|
||||||
# undef CGAL_USE_GMP
|
# undef CGAL_USE_GMP
|
||||||
# undef CGAL_USE_MPFR
|
# undef CGAL_USE_MPFR
|
||||||
# endif // CGAL_USE_MPFR and no <mpfr.h>
|
# endif // CGAL_USE_MPFR and no <mpfr.h>
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ namespace CGAL {
|
||||||
|
|
||||||
struct Initializer_list {
|
struct Initializer_list {
|
||||||
result_type operator()(std::initializer_list<NT> l) const {
|
result_type operator()(std::initializer_list<NT> l) const {
|
||||||
return Iterator()(l.size(),l.begin(),l.end());
|
return Iterator()(static_cast<int>(l.size()),l.begin(),l.end());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,6 @@ class Projected_triangle {
|
||||||
public:
|
public:
|
||||||
Projected_triangle() {}
|
Projected_triangle() {}
|
||||||
Projected_triangle(double z, Triangle tr) : m_z(z), m_t(tr) {}
|
Projected_triangle(double z, Triangle tr) : m_z(z), m_t(tr) {}
|
||||||
Projected_triangle(const Projected_triangle &pt) : m_z(pt.z()), m_t(pt.t()) {}
|
|
||||||
|
|
||||||
Triangle t() { return m_t; }
|
Triangle t() { return m_t; }
|
||||||
const Triangle t() const { return m_t; }
|
const Triangle t() const { return m_t; }
|
||||||
|
|
|
||||||
|
|
@ -207,26 +207,26 @@ namespace CGAL {
|
||||||
// Compute distance of the bounding boxes.
|
// Compute distance of the bounding boxes.
|
||||||
// Distance along the x-axis.
|
// Distance along the x-axis.
|
||||||
FT dist_x = FT(0);
|
FT dist_x = FT(0);
|
||||||
if (tri_max.x() < bbox.min(0)) {
|
if (tri_max.x() < (bbox.min)(0)) {
|
||||||
dist_x = bbox.min(0) - tri_max.x();
|
dist_x = (bbox.min)(0) - tri_max.x();
|
||||||
} else if (bbox.max(0) < tri_min.x()) {
|
} else if ((bbox.max)(0) < tri_min.x()) {
|
||||||
dist_x = tri_min.x() - bbox.max(0);
|
dist_x = tri_min.x() - (bbox.max)(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Distance along the y-axis.
|
// Distance along the y-axis.
|
||||||
FT dist_y = FT(0);
|
FT dist_y = FT(0);
|
||||||
if (tri_max.y() < bbox.min(1)) {
|
if (tri_max.y() < (bbox.min)(1)) {
|
||||||
dist_y = bbox.min(1) - tri_max.y();
|
dist_y = (bbox.min)(1) - tri_max.y();
|
||||||
} else if (bbox.max(1) < tri_min.y()) {
|
} else if ((bbox.max)(1) < tri_min.y()) {
|
||||||
dist_y = tri_min.y() - bbox.max(1);
|
dist_y = tri_min.y() - (bbox.max)(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Distance along the z-axis.
|
// Distance along the z-axis.
|
||||||
FT dist_z = FT(0);
|
FT dist_z = FT(0);
|
||||||
if (tri_max.z() < bbox.min(2)) {
|
if (tri_max.z() < (bbox.min)(2)) {
|
||||||
dist_z = bbox.min(2) - tri_max.z();
|
dist_z = (bbox.min)(2) - tri_max.z();
|
||||||
} else if (bbox.max(2) < tri_min.z()) {
|
} else if ((bbox.max)(2) < tri_min.z()) {
|
||||||
dist_z = tri_min.z() - bbox.max(2);
|
dist_z = tri_min.z() - (bbox.max)(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lower bound on the distance between the two bounding boxes is given
|
// Lower bound on the distance between the two bounding boxes is given
|
||||||
|
|
@ -443,11 +443,11 @@ namespace CGAL {
|
||||||
|
|
||||||
// Shift the vector to be the difference between the farthest corner
|
// Shift the vector to be the difference between the farthest corner
|
||||||
// of the bounding box away from the closest point on TM2.
|
// of the bounding box away from the closest point on TM2.
|
||||||
FT diff_x = (bbox.max(0) - bbox.min(0)) / FT(2);
|
FT diff_x = ((bbox.max)(0) - (bbox.min)(0)) / FT(2);
|
||||||
if (difference.x() < 0) diff_x = diff_x * -FT(1);
|
if (difference.x() < 0) diff_x = diff_x * -FT(1);
|
||||||
FT diff_y = (bbox.max(1) - bbox.min(1)) / FT(2);
|
FT diff_y = ((bbox.max)(1) - (bbox.min)(1)) / FT(2);
|
||||||
if (difference.y() < 0) diff_y = diff_y * -FT(1);
|
if (difference.y() < 0) diff_y = diff_y * -FT(1);
|
||||||
FT diff_z = (bbox.max(2) - bbox.min(2)) / FT(2);
|
FT diff_z = ((bbox.max)(2) - (bbox.min)(2)) / FT(2);
|
||||||
if (difference.z() < 0) diff_z = diff_z * -FT(1);
|
if (difference.z() < 0) diff_z = diff_z * -FT(1);
|
||||||
difference = difference + Vector_3(diff_x, diff_y, diff_z); // it is (9) in the paper
|
difference = difference + Vector_3(diff_x, diff_y, diff_z); // it is (9) in the paper
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ public:
|
||||||
lp.set_a(index_x4, j, -1.0); // -x4
|
lp.set_a(index_x4, j, -1.0); // -x4
|
||||||
|
|
||||||
// right hand side (>= -dj)
|
// right hand side (>= -dj)
|
||||||
FT dj = distance_to_origin(plane) * CGAL::sign(plane.d());
|
FT dj = distance_to_origin(plane) * static_cast<int>(CGAL::sign(plane.d()));
|
||||||
lp.set_b(j, -dj);
|
lp.set_b(j, -dj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,12 +71,12 @@ generic_copy_OFF(File_scanner_OFF& scanner,
|
||||||
if(! in)
|
if(! in)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::size_t no;
|
std::size_t no = 0;
|
||||||
scanner.scan_facet(no, i);
|
scanner.scan_facet(no, i);
|
||||||
writer.write_facet_begin(no);
|
writer.write_facet_begin(no);
|
||||||
for(std::size_t j=0; j<no; ++j)
|
for(std::size_t j=0; j<no; ++j)
|
||||||
{
|
{
|
||||||
std::size_t index;
|
std::size_t index = 0;
|
||||||
scanner.scan_facet_vertex_index(index, j+1, i);
|
scanner.scan_facet_vertex_index(index, j+1, i);
|
||||||
writer.write_facet_vertex_index(index);
|
writer.write_facet_vertex_index(index);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,13 +67,13 @@ enum Context { CURRENT_CONTEXT, PARENT_CONTEXT };
|
||||||
/// exception. That allows a Qt Script to catch the exception and deal
|
/// exception. That allows a Qt Script to catch the exception and deal
|
||||||
/// with it.
|
/// with it.
|
||||||
template <typename Callable>
|
template <typename Callable>
|
||||||
typename Optional_or_bool<typename std::result_of<Callable()>::type>::type
|
typename Optional_or_bool<typename cpp11::result_of<Callable()>::type>::type
|
||||||
wrap_a_call_to_cpp(Callable f,
|
wrap_a_call_to_cpp(Callable f,
|
||||||
QScriptable* qs = 0,
|
QScriptable* qs = 0,
|
||||||
const char* file = 0,
|
const char* file = 0,
|
||||||
int line = -1,
|
int line = -1,
|
||||||
Context c = CURRENT_CONTEXT) {
|
Context c = CURRENT_CONTEXT) {
|
||||||
typedef typename std::result_of<Callable()>::type Callable_RT;
|
typedef typename cpp11::result_of<Callable()>::type Callable_RT;
|
||||||
typedef Optional_or_bool<Callable_RT> O_r_b;
|
typedef Optional_or_bool<Callable_RT> O_r_b;
|
||||||
typedef typename O_r_b::type Return_type;
|
typedef typename O_r_b::type Return_type;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue