diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h index 1383240a617..6780f5cca98 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h @@ -173,7 +173,7 @@ public: CGAL_precondition (pgn2.is_simple()); // Prepare the vector of directions for the first polygon. - const unsigned int n1 = pgn1.size(); + const unsigned int n1 = static_cast(pgn1.size()); const bool forward1 = (pgn1.orientation() == COUNTERCLOCKWISE); std::vector dirs1 (n1); Vertex_circulator curr1, next1; @@ -193,7 +193,7 @@ public: // Prepare the vector of directions for the second polygon. // Also prepare a list containing all reflex vertices of this polygon. - const unsigned int n2 = pgn2.size(); + const unsigned int n2 = static_cast(pgn2.size()); const bool forward2 = (pgn2.orientation() == COUNTERCLOCKWISE); std::vector dirs2 (n2); Vertex_circulator prev2, curr2, next2; @@ -527,7 +527,7 @@ private: // the list contains no "cyclic" sub-cylces. We do that by making sure that // the first and last segments of the list correspond to traversals of // different polygons. - int steps = cycle.size(); + int steps = static_cast(cycle.size()); while (steps > 0 && cycle.front().label().get_flag() == diff --git a/Minkowski_sum_2/include/CGAL/Small_side_angle_bisector_decomposition_2.h b/Minkowski_sum_2/include/CGAL/Small_side_angle_bisector_decomposition_2.h index 2feca19f2fa..56d8cb4a35a 100644 --- a/Minkowski_sum_2/include/CGAL/Small_side_angle_bisector_decomposition_2.h +++ b/Minkowski_sum_2/include/CGAL/Small_side_angle_bisector_decomposition_2.h @@ -247,7 +247,7 @@ private: unsigned int i) const { if (i == 0) - return (vec.size() - 1); + return static_cast(vec.size() - 1); return (i - 1); } @@ -414,7 +414,7 @@ private: Point_vector_2& vec) const { // Resize the vector to fit the polygon. - const unsigned int n = pgn.size(); + const unsigned int n = static_cast(pgn.size()); const bool forward = (pgn.orientation() == COUNTERCLOCKWISE); Vertex_circulator prev, curr, next; unsigned int reflex_count = 0; @@ -755,7 +755,7 @@ private: } else if (*iter < ind1) { - vec2[i2].visible.push_back (*iter + vec.size() - ind2); + vec2[i2].visible.push_back (*iter + static_cast(vec.size()) - ind2); } } @@ -769,7 +769,7 @@ private: } else if (*iter < ind1) { - vec2[i2].non_visible.push_back (*iter + vec.size() - ind2); + vec2[i2].non_visible.push_back (*iter + static_cast(vec.size()) - ind2); } } } @@ -922,7 +922,7 @@ private: OutputIterator _output_polygon (const Point_vector_2& vec, OutputIterator oi) const { - const unsigned int n = vec.size(); + const unsigned int n = static_cast(vec.size()); Polygon_2 pgn; unsigned int k;