diff --git a/contrib/poly2tri/poly2tri/sweep/sweep_context.cc b/contrib/poly2tri/poly2tri/sweep/sweep_context.cc index 235e1eb05..184457cf2 100644 --- a/contrib/poly2tri/poly2tri/sweep/sweep_context.cc +++ b/contrib/poly2tri/poly2tri/sweep/sweep_context.cc @@ -96,7 +96,7 @@ void SweepContext::InitTriangulation() void SweepContext::InitEdges(std::vector polyline) { - int num_points = polyline.size(); + int num_points = static_cast(polyline.size()); for (int i = 0; i < num_points; i++) { int j = i < num_points - 1 ? i + 1 : 0; edge_list.push_back(new Edge(*polyline[i], *polyline[j])); diff --git a/contrib/poly2tri/poly2tri/sweep/sweep_context.h b/contrib/poly2tri/poly2tri/sweep/sweep_context.h index 1010c0e8a..2f7d8e982 100644 --- a/contrib/poly2tri/poly2tri/sweep/sweep_context.h +++ b/contrib/poly2tri/poly2tri/sweep/sweep_context.h @@ -158,7 +158,7 @@ inline AdvancingFront* SweepContext::front() inline int SweepContext::point_count() { - return points_.size(); + return static_cast(points_.size()); } inline void SweepContext::set_head(Point* p1)