Changeset 5488 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2012-09-01T18:07:46+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java
r5487 r5488 171 171 } 172 172 for (int i=lowestIndex; i<wNodes.size()-1; i++) { 173 173 wNodesToUse.add(wNodes.get(i)); 174 174 } 175 175 for (int i=0; i<lowestIndex; i++) { 176 176 wNodesToUse.add(wNodes.get(i)); 177 177 } 178 178 wNodesToUse.add(wNodes.get(lowestIndex)); … … 185 185 // If this way has not direction-dependant keys, make sure the list is ordered the same for all ways (fix #8015) 186 186 if (!w.hasDirectionKeys()) { 187 188 189 190 191 192 193 194 195 196 197 198 199 187 int hash = wLat.hashCode(); 188 if (!knownHashCodes.contains(hash)) { 189 List<LatLon> reversedwLat = new ArrayList<LatLon>(wLat); 190 Collections.reverse(reversedwLat); 191 int reverseHash = reversedwLat.hashCode(); 192 if (!knownHashCodes.contains(reverseHash)) { 193 // Neither hash or reversed hash is known, remember hash 194 knownHashCodes.add(hash); 195 } else { 196 // Reversed hash is known, use the reverse list then 197 wLat = reversedwLat; 198 } 199 } 200 200 } 201 201 Map<String, String> wkeys = w.getKeys();
Note:
See TracChangeset
for help on using the changeset viewer.