@@ -629,9 +629,9 @@ PyObject* TriContourGenerator::contour_to_segs_and_kinds(const Contour& contour)
629
629
ContourLine::const_iterator point;
630
630
631
631
// Find total number of points in all contour lines.
632
- int n_points = 0 ;
632
+ npy_intp n_points = 0 ;
633
633
for (line = contour.begin (); line != contour.end (); ++line)
634
- n_points += line->size ();
634
+ n_points += (npy_intp) line->size ();
635
635
636
636
// Create segs array for point coordinates.
637
637
npy_intp segs_dims[2 ] = {n_points, 2 };
@@ -1021,8 +1021,8 @@ TrapezoidMapTriFinder::add_edge_to_tree(const Edge& edge)
1021
1021
// Iterate through trapezoids intersecting edge from left to right.
1022
1022
// Replace each old trapezoid with 2+ new trapezoids, and replace its
1023
1023
// 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) {
1026
1026
Trapezoid* old = trapezoids[i]; // old trapezoid to replace.
1027
1027
bool start_trap = (i == 0 );
1028
1028
bool end_trap = (i == ntraps-1 );
@@ -1397,8 +1397,8 @@ TrapezoidMapTriFinder::initialize()
1397
1397
std::random_shuffle (_edges.begin ()+2 , _edges.end (), rng);
1398
1398
1399
1399
// 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 ) {
1402
1402
if (!add_edge_to_tree (_edges[index ]))
1403
1403
throw std::runtime_error (" Triangulation is invalid" );
1404
1404
_tree->assert_valid (index == nedges-1 );
0 commit comments