- Timestamp:
- 2022-07-07T23:02:39+02:00 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Way.java
r18494 r18513 158 158 public List<Pair<Node, Node>> getNodePairs(boolean sort) { 159 159 // For a way of size n, there are n - 1 pairs (a -> b, b -> c, c -> d, etc., 4 nodes -> 3 pairs) 160 List<Pair<Node, Node>> chunkSet = new ArrayList<>( this.getNodesCount() - 1);160 List<Pair<Node, Node>> chunkSet = new ArrayList<>(Math.max(0, this.getNodesCount() - 1)); 161 161 if (isIncomplete()) return chunkSet; 162 162 Node lastN = null;
Note:
See TracChangeset
for help on using the changeset viewer.