From 2e14ff9f048ce0c704a30d1d3ae97506595bf05a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 19:59:11 +0000 Subject: [PATCH] Kernel --- Installation/include/CGAL/disable_warnings.h | 4 +++- .../include/CGAL/Line_2_Iso_rectangle_2_intersection.h | 4 ++++ .../include/CGAL/Ray_2_Iso_rectangle_2_intersection.h | 4 ++++ .../include/CGAL/Segment_2_Iso_rectangle_2_intersection.h | 4 ++++ Intersections_3/include/CGAL/intersection_3.h | 3 +++ Kernel_23/include/CGAL/Circle_2.h | 2 +- Kernel_23/include/CGAL/Sphere_3.h | 2 +- Number_types/include/CGAL/Quotient.h | 6 +++--- 8 files changed, 23 insertions(+), 6 deletions(-) diff --git a/Installation/include/CGAL/disable_warnings.h b/Installation/include/CGAL/disable_warnings.h index 645f623b52d..757751cab4d 100644 --- a/Installation/include/CGAL/disable_warnings.h +++ b/Installation/include/CGAL/disable_warnings.h @@ -23,9 +23,11 @@ # pragma warning(push) # pragma warning(disable: 4099) // struct class mixed # pragma warning(disable: 4127) // conditional expression is constant -# pragma warning(disable: 4355) // 'this' : used in base member initializer list +# pragma warning(disable: 4355) // 'this' : used in base member initializer list # pragma warning(disable: 4510) // default constructor could not be generated # pragma warning(disable: 4512) // assignment operator could not be generated # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required # pragma warning(disable: 4706) // assignment within conditional expression +# pragma warning(disable: 4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used + #endif diff --git a/Intersections_2/include/CGAL/Line_2_Iso_rectangle_2_intersection.h b/Intersections_2/include/CGAL/Line_2_Iso_rectangle_2_intersection.h index 43b73fb5174..70cc67ce43d 100644 --- a/Intersections_2/include/CGAL/Line_2_Iso_rectangle_2_intersection.h +++ b/Intersections_2/include/CGAL/Line_2_Iso_rectangle_2_intersection.h @@ -27,6 +27,8 @@ #ifndef CGAL_LINE_2_ISO_RECTANGLE_2_INTERSECTION_H #define CGAL_LINE_2_ISO_RECTANGLE_2_INTERSECTION_H +#include + #include #include #include @@ -223,4 +225,6 @@ CGAL_DO_INTERSECT_FUNCTION(Line_2, Iso_rectangle_2, 2) } //namespace CGAL +#include + #endif diff --git a/Intersections_2/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h b/Intersections_2/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h index 3982133349f..8a862b153dd 100644 --- a/Intersections_2/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h +++ b/Intersections_2/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h @@ -27,6 +27,8 @@ #ifndef CGAL_RAY_2_ISO_RECTANGLE_2_INTERSECTION_H #define CGAL_RAY_2_ISO_RECTANGLE_2_INTERSECTION_H +#include + #include #include #include @@ -211,4 +213,6 @@ CGAL_DO_INTERSECT_FUNCTION(Ray_2, Iso_rectangle_2, 2) } //namespace CGAL +#include + #endif // CGAL_RAY_2_iSO_RECTANGLE_2_INTERSECTION_H diff --git a/Intersections_2/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h b/Intersections_2/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h index cf3ddc3ff77..7b85db690b2 100644 --- a/Intersections_2/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h +++ b/Intersections_2/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h @@ -27,6 +27,8 @@ #ifndef CGAL_SEGMENT_2_ISO_RECTANGLE_2_INTERSECTION_H #define CGAL_SEGMENT_2_ISO_RECTANGLE_2_INTERSECTION_H +#include + #include #include #include @@ -236,4 +238,6 @@ CGAL_DO_INTERSECT_FUNCTION(Segment_2, Iso_rectangle_2, 2) } //namespace CGAL +#include + #endif // CGAL_SEGMENT_2_ISO_RECTANGLE_2_INTERSECTION_H diff --git a/Intersections_3/include/CGAL/intersection_3.h b/Intersections_3/include/CGAL/intersection_3.h index d52ffd72a58..2aa69cf954c 100644 --- a/Intersections_3/include/CGAL/intersection_3.h +++ b/Intersections_3/include/CGAL/intersection_3.h @@ -27,6 +27,8 @@ #ifndef CGAL_INTERSECTION_3_H #define CGAL_INTERSECTION_3_H +#include + #include #include @@ -50,5 +52,6 @@ #include #include +#include #endif // CGAL_INTERSECTION_3_H diff --git a/Kernel_23/include/CGAL/Circle_2.h b/Kernel_23/include/CGAL/Circle_2.h index c69f40f5239..98a8ce2a3a2 100644 --- a/Kernel_23/include/CGAL/Circle_2.h +++ b/Kernel_23/include/CGAL/Circle_2.h @@ -273,7 +273,7 @@ extract(std::istream& is, Circle_2& c) { typename R::Point_2 center; typename R::FT squared_radius(0); - int o; + int o=0; switch(get_mode(is)) { case IO::ASCII : is >> center >> iformat(squared_radius) >> o; diff --git a/Kernel_23/include/CGAL/Sphere_3.h b/Kernel_23/include/CGAL/Sphere_3.h index 739c8a38928..636363af8e1 100644 --- a/Kernel_23/include/CGAL/Sphere_3.h +++ b/Kernel_23/include/CGAL/Sphere_3.h @@ -319,7 +319,7 @@ extract(std::istream& is, Sphere_3& c, const Homogeneous_tag&) { typename R::Point_3 center; typename R::FT squared_radius; - int o; + int o=0; switch(get_mode(is)) { case IO::ASCII : is >> center >> squared_radius >> o; diff --git a/Number_types/include/CGAL/Quotient.h b/Number_types/include/CGAL/Quotient.h index 69770c64b63..46a2e3a3c6e 100644 --- a/Number_types/include/CGAL/Quotient.h +++ b/Number_types/include/CGAL/Quotient.h @@ -91,7 +91,7 @@ class Quotient { Split_double()(n, num, den); } Quotient(const CGAL_int(NT) & n) - : num(n), den(1) {} + : num(n), den(NT(1)) {} template explicit Quotient(const T& n) : num(n), den(1) {} @@ -403,8 +403,8 @@ quotient_cmp(const Quotient& x, const Quotient& y) if (diff == 0) { int msign = CGAL_NTS sign(x.den) * CGAL_NTS sign(y.den); - NT leftop = x.num * y.den * msign; - NT rightop = y.num * x.den * msign; + NT leftop = NT(x.num * y.den * msign); + NT rightop = NT(y.num * x.den * msign); return CGAL_NTS compare(leftop, rightop); } else