diff -up gdl-1.0.2/src/qhull.cpp.size gdl-1.0.2/src/qhull.cpp --- gdl-1.0.2/src/qhull.cpp.size 2023-01-06 10:39:47.000000000 -0700 +++ gdl-1.0.2/src/qhull.cpp 2023-01-16 19:35:16.464432434 -0700 @@ -784,7 +784,7 @@ int output_qhull_voronoi_local(Qhull* qh func = e->GetParAs(3); //input function tetra_list = e->GetParAs(4); //indices of tetrahedra vertices from qhull - int inDim = e->GetParAs(0)->Dim(0); + SizeT inDim = e->GetParAs(0)->Dim(0); p0 = new DDoubleGDL( *(new dimension(3, inDim)), BaseGDL::ZERO ); //concatenation of the 3 separate inputs arrays for(int i=0; i<3; i++) @@ -794,7 +794,7 @@ int output_qhull_voronoi_local(Qhull* qh { e->Throw("separated input arrays must have same length and be 1 dimensional"); } - for(int j=0; j points; - points.reserve(np); + points.resize(np); - for (int i =0; i < np; i++) + for (size_t i =0; i < np; i++) { points[i] = { (*p0)[3*i], (*p0)[3*i+1], (*p0)[3*i+2] }; //TODO handle not finite values @@ -829,7 +829,7 @@ int output_qhull_voronoi_local(Qhull* qh // vector holding all necessary info on the triangulation vector tetra_data; - tetra_data.reserve(n_tetra); + tetra_data.resize(n_tetra); // directly available info array empty_neighbours {-1,-1,-1,-1}; @@ -848,7 +848,7 @@ int output_qhull_voronoi_local(Qhull* qh // TOO SLOW, FIND ANOTHER METHOD vector tetra_neigh_count(n_tetra, 0); - tetra_neigh_count.reserve(n_tetra); + tetra_neigh_count.resize(n_tetra); for(int i=0; i