@@ -629,9 +629,9 @@ PyObject* TriContourGenerator::contour_to_segs_and_kinds(const Contour& contour)
629629 ContourLine::const_iterator point;
630630
631631 // Find total number of points in all contour lines.
632- int n_points = 0 ;
632+ npy_intp n_points = 0 ;
633633 for (line = contour.begin (); line != contour.end (); ++line)
634- n_points += line->size ();
634+ n_points += (npy_intp) line->size ();
635635
636636 // Create segs array for point coordinates.
637637 npy_intp segs_dims[2 ] = {n_points, 2 };
@@ -1021,8 +1021,8 @@ TrapezoidMapTriFinder::add_edge_to_tree(const Edge& edge)
10211021 // Iterate through trapezoids intersecting edge from left to right.
10221022 // Replace each old trapezoid with 2+ new trapezoids, and replace its
10231023 // corresponding nodes in the search tree with new nodes.
1024- unsigned int ntraps = trapezoids.size ();
1025- for (unsigned int i = 0 ; i < ntraps; ++i) {
1024+ size_t ntraps = trapezoids.size ();
1025+ for (size_t i = 0 ; i < ntraps; ++i) {
10261026 Trapezoid* old = trapezoids[i]; // old trapezoid to replace.
10271027 bool start_trap = (i == 0 );
10281028 bool end_trap = (i == ntraps-1 );
@@ -1397,8 +1397,8 @@ TrapezoidMapTriFinder::initialize()
13971397 std::random_shuffle (_edges.begin ()+2 , _edges.end (), rng);
13981398
13991399 // Add edges, one at a time, to tree.
1400- unsigned int nedges = _edges.size ();
1401- for (unsigned int index = 2 ; index < nedges; ++index) {
1400+ size_t nedges = _edges.size ();
1401+ for (size_t index = 2 ; index < nedges; ++index) {
14021402 if (!add_edge_to_tree (_edges[index]))
14031403 throw std::runtime_error (" Triangulation is invalid" );
14041404 _tree->assert_valid (index == nedges-1 );
0 commit comments