File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
core/src/main/java/com/graphhopper/util Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -424,13 +424,16 @@ public PointList clone(boolean reverse) {
424
424
return clonePL ;
425
425
}
426
426
427
+ /**
428
+ * This method does a deep copy of this object for the specified range.
429
+ */
427
430
public PointList copy (int from , int end ) {
428
431
if (from > end )
429
432
throw new IllegalArgumentException ("from must be smaller or equals to end" );
430
433
if (from < 0 || end > size )
431
434
throw new IllegalArgumentException ("Illegal interval: " + from + ", " + end + ", size:" + size );
432
435
433
- PointList copyPL = new PointList (size , is3D );
436
+ PointList copyPL = new PointList (end - from , is3D );
434
437
if (is3D )
435
438
for (int i = from ; i < end ; i ++) {
436
439
copyPL .add (latitudes [i ], longitudes [i ], elevations [i ]);
You can’t perform that action at this time.
0 commit comments