Changeset 11149 in josm for trunk/src/org
- Timestamp:
- 2016-10-20T11:14:10+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWay.java
r11136 r11149 32 32 public void visit(Way w) { 33 33 Set<Node> nodes = new HashSet<>(); 34 int last = w.getNodesCount(); 35 if (last < 2) 36 return; 37 if (w.firstNode() == w.lastNode()) 38 last--; // closed way, ignore last node 39 nodes.add(w.firstNode()); 40 for (int i = 1; i < last; i++) { 34 for (int i = 1; i < w.getNodesCount() - 1; i++) { 41 35 Node n = w.getNode(i); 42 36 if (nodes.contains(n)) {
Note:
See TracChangeset
for help on using the changeset viewer.