@@ -232,36 +232,36 @@ Napi::Value CalculateNFP(const Napi::CallbackInfo& info) {
232232 Napi::Array pointlist = Napi::Array::New (env);
233233 int j = 0 ;
234234
235- for (polygon_traits<polygon>::iterator_type itr = polys[i].begin (); itr != polys[i].end (); ++itr) {
235+ for (boost::polygon:: polygon_traits<polygon>::iterator_type itr = polys[i].begin (); itr != polys[i].end (); ++itr) {
236236 Napi::Object p = Napi::Object::New (env);
237237 p.Set (" x" , ((double )(*itr).get (boost::polygon::HORIZONTAL)) / inputscale + xshift);
238238 p.Set (" y" , ((double )(*itr).get (boost::polygon::VERTICAL)) / inputscale + yshift);
239239
240- pointlist[j] = p ;
240+ pointlist. Set (j, p) ;
241241 j++;
242242 }
243243
244244 // holes
245245 Napi::Array children = Napi::Array::New (env);
246246 int k = 0 ;
247- for (polygon_with_holes_traits<polygon>::iterator_holes_type itrh = begin_holes (polys[i]); itrh != end_holes (polys[i]); ++itrh){
247+ for (boost::polygon:: polygon_with_holes_traits<polygon>::iterator_holes_type itrh = begin_holes (polys[i]); itrh != end_holes (polys[i]); ++itrh){
248248 Napi::Array child = Napi::Array::New (env);
249249 int z = 0 ;
250- for (polygon_traits<polygon>::iterator_type itr2 = (*itrh).begin (); itr2 != (*itrh).end (); ++itr2) {
250+ for (boost::polygon:: polygon_traits<polygon>::iterator_type itr2 = (*itrh).begin (); itr2 != (*itrh).end (); ++itr2) {
251251 Napi::Object c = Napi::Object::New (env);
252252 c.Set (" x" , ((double )(*itr2).get (boost::polygon::HORIZONTAL)) / inputscale + xshift);
253253 c.Set (" y" , ((double )(*itr2).get (boost::polygon::VERTICAL)) / inputscale + yshift);
254254
255- child[z] = c ;
255+ child. Set (z, c) ;
256256 z++;
257257 }
258- children[k] = child;
258+ children. Set (k, child) ;
259259 k++;
260260 }
261261
262262 pointlist.Set (" children" , children);
263263
264- result_list[i] = pointlist;
264+ result_list. Set (i, pointlist) ;
265265 }
266266
267267 return result_list;
0 commit comments