From 1bba93acc798fcc771c31f1681c40875e0baf6c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Sat, 17 Jun 2017 07:31:22 +0200 Subject: [PATCH 1/3] explicit that the sign function is the one from CGAL to avoid ambiguity --- .../CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h | 4 ++-- .../CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h | 2 +- .../CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h | 4 ++-- .../Polynomial/internal/Filtered_kernel/Filtered_sign_at.h | 4 ++-- .../include/CGAL/internal/corefinement/predicates.h | 6 +++--- .../Ray_3_Triangle_3_traversal_traits.h | 2 +- Polynomial/include/CGAL/Polynomial/Polynomial_type.h | 6 +++--- .../include/CGAL/Scale_space_surface_reconstruction_3.h | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h index f0541fb38e1..c6dfb9bee6f 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h @@ -2009,7 +2009,7 @@ public: std::make_pair(x_pair.first, x_pair.second)); CGAL::Sign s_lower = CGAL::sign(iv.first); - if(s_lower == sign(iv.second)) { + if(s_lower == CGAL::sign(iv.second)) { return s_lower; } else { prec*=2; @@ -2111,7 +2111,7 @@ public: y_pair.first, y_pair.second)); CGAL::Sign s_lower = CGAL::sign(iv.first); - if(s_lower == sign(iv.second)) { + if(s_lower == CGAL::sign(iv.second)) { return s_lower; } else { prec*=2; diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h index 67396a86de7..bfc2b6f59af 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/univariate_polynomial_utils.h @@ -68,7 +68,7 @@ namespace internal { int variations = 0; int old_sign = CGAL::sign(P[n]); // never zero unless P is zero for (int i = n-1; i >= 0; i--) { - int s = sign(P[i]); + int s = CGAL::sign(P[i]); if (s == 0) continue; if (old_sign != s) { old_sign = s; diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h index 528931979dc..1b9b14897b0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h @@ -3696,7 +3696,7 @@ _compute_signs(const DHalfedge* he_anchor, boost::mpl::bool_) const } while (he_curr != he_end); // Return the leftmost vertex and its x_index (with respect to he_before). - return (std::make_pair(sign(x_index), sign(y_index))); + return (std::make_pair(CGAL::sign(x_index), CGAL::sign(y_index))); } // Computes the halfedge that points at the smallest vertex in a closed ccb @@ -3823,7 +3823,7 @@ _compute_signs_and_min(const DHalfedge* he_anchor, } while (he_next != he_end); // Return the leftmost vertex and the signs. - return std::make_pair(std::make_pair(sign(x_index), sign(y_index)), he_min); + return std::make_pair(std::make_pair(CGAL::sign(x_index), CGAL::sign(y_index)), he_min); } /* This is the implementation for the case where all 4 boundary sides are diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_sign_at.h b/Kinetic_data_structures/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_sign_at.h index 2a6c7d02723..08c8dc4e0d2 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_sign_at.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/internal/Filtered_kernel/Filtered_sign_at.h @@ -46,7 +46,7 @@ NTT &t, const Kernel &k) if (v.inf() >0) return POSITIVE; else if (v.sup() < 0) return NEGATIVE; else if (v.inf()==v.sup()) { - return sign(v); + return CGAL::sign(v); } else { //std::cout << "Falling back on exact.\n"; @@ -54,7 +54,7 @@ NTT &t, const Kernel &k) //typename CGAL::NT_converter ec; typename Kernel::Exact_kernel::NT et= k.exact_function_converter_object().nt_converter()(t); - return sign(fh.exact_function().value_at(et)); + return CGAL::sign(fh.exact_function().value_at(et)); }; } diff --git a/Operations_on_polyhedra/include/CGAL/internal/corefinement/predicates.h b/Operations_on_polyhedra/include/CGAL/internal/corefinement/predicates.h index b82f1781d23..022af4c6c47 100644 --- a/Operations_on_polyhedra/include/CGAL/internal/corefinement/predicates.h +++ b/Operations_on_polyhedra/include/CGAL/internal/corefinement/predicates.h @@ -60,7 +60,7 @@ bool sorted_around_edge( CGAL_precondition( !coplanar(O_prime,O,P2,Q) || coplanar_orientation(O,O_prime,P2,Q)==NEGATIVE ); - Sign s0 = sign( determinant(O-O_prime,P1-O,P2-O) ); + Sign s0 = CGAL::sign( determinant(O-O_prime,P1-O,P2-O) ); if ( s0==ZERO ) { //O, O_prime, P1 and P2 are coplanar @@ -70,8 +70,8 @@ bool sorted_around_edge( } //O, O_prime, P1 and P2 are not coplanar - Sign s1 = sign( determinant(O-O_prime,P1-O,Q -O) ); - Sign s2 = sign( determinant(O-O_prime,Q -O,P2-O) ); + Sign s1 = CGAL::sign( determinant(O-O_prime,P1-O,Q -O) ); + Sign s2 = CGAL::sign( determinant(O-O_prime,Q -O,P2-O) ); if (s0 == POSITIVE) // the angle P1,O,P2 is smaller that Pi. return ( s1 == POSITIVE ) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h index 4c7b831be15..44cd83ae07d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h @@ -179,7 +179,7 @@ public: if ( orient_3!=COPLANAR && ( //indicates whether the ray is oriented toward the positive side of the plane - ( POSITIVE == sign( query.to_vector().z() ) ) + ( POSITIVE == CGAL::sign( query.to_vector().z() ) ) == //indicates whether the source of the ray is in the positive side of the plane (orient_3==POSITIVE) diff --git a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h index 3a73f5a045b..fef6855a252 100644 --- a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h +++ b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h @@ -566,9 +566,9 @@ public: int d1 = degree(); int d2 = p2.degree(); if (d1 > d2) { - return sign((*this)[d1]); + return CGAL::sign((*this)[d1]); } else if (d1 < d2) { - return -sign(p2[d2]); + return -CGAL::sign(p2[d2]); } for (int i = d1; i >= 0; i--) { @@ -585,7 +585,7 @@ public: CGAL_precondition(degree() >= 0); if (degree() > 0) { - return sign(lcoeff()); + return CGAL::sign(lcoeff()); } else { return compare((*this)[0], p2); } diff --git a/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h b/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h index 32d63d7ab84..dbdc6edbb1b 100644 --- a/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h +++ b/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h @@ -482,7 +482,7 @@ public: * \sa `estimate_neighborhood_squared_radius()`. */ bool has_neighborhood_squared_radius() const { - return sign( _squared_radius ) == POSITIVE; + return CGAL::sign( _squared_radius ) == POSITIVE; } /// \cond internal_doc From a42b9f1187c9831100983f6a80a8a406e8a27f14 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 16 Jun 2017 14:26:52 +0200 Subject: [PATCH 2/3] Use version 2.6.3 of qglviewer instead of master --- .travis/build_package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/build_package.sh b/.travis/build_package.sh index 4db46faba23..2bb583ef54d 100755 --- a/.travis/build_package.sh +++ b/.travis/build_package.sh @@ -19,7 +19,7 @@ function build_demo { cd build-travis if [ $NEED_3D = 1 ]; then #install libqglviewer - git clone --depth=1 https://github.com/GillesDebunne/libQGLViewer.git ./qglviewer + git clone --depth=4 -b v2.6.3 --single-branch https://github.com/GillesDebunne/libQGLViewer.git ./qglviewer pushd ./qglviewer/QGLViewer #use qt5 instead of qt4 export QT_SELECT=5 From 0889f34aa74e6e91c75d7eab7b9979e15cbc81d3 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 5 Jul 2017 10:20:19 +0200 Subject: [PATCH 3/3] The fix was incorrect for Polynomial A warning told us there was a problem: .../include/CGAL/Polynomial/Polynomial_type.h:560:48: warning: unused variable 'sign' [-Wunused-variable] typename Real_embeddable_traits::Sgn sign; --- Polynomial/include/CGAL/Polynomial/Polynomial_type.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h index fef6855a252..3a73f5a045b 100644 --- a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h +++ b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h @@ -566,9 +566,9 @@ public: int d1 = degree(); int d2 = p2.degree(); if (d1 > d2) { - return CGAL::sign((*this)[d1]); + return sign((*this)[d1]); } else if (d1 < d2) { - return -CGAL::sign(p2[d2]); + return -sign(p2[d2]); } for (int i = d1; i >= 0; i--) { @@ -585,7 +585,7 @@ public: CGAL_precondition(degree() >= 0); if (degree() > 0) { - return CGAL::sign(lcoeff()); + return sign(lcoeff()); } else { return compare((*this)[0], p2); }