Changeset 10803 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2016-08-15T14:24:27+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13347 - simplify CrossingWays test (patch by Gerd Petermann)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java

    r10670 r10803  
    88import java.util.Arrays;
    99import java.util.HashMap;
    10 import java.util.HashSet;
    1110import java.util.List;
    1211import java.util.Map;
    1312import java.util.Objects;
    14 import java.util.Set;
    1513
    1614import org.openstreetmap.josm.Main;
     
    4139    /** All way segments, grouped by cells */
    4240    private final Map<Point2D, List<WaySegment>> cellSegments = new HashMap<>(1000);
    43     /** The already detected errors */
    44     private final Set<WaySegment> errorSegments = new HashSet<>();
    4541    /** The already detected ways in error */
    4642    private final Map<List<Way>, List<WaySegment>> seenWays = new HashMap<>(50);
     
    189185        super.startTest(monitor);
    190186        cellSegments.clear();
    191         errorSegments.clear();
    192187        seenWays.clear();
    193188    }
     
    197192        super.endTest();
    198193        cellSegments.clear();
    199         errorSegments.clear();
    200194        seenWays.clear();
    201195    }
     
    242236                    List<WaySegment> highlight;
    243237
    244                     if ((errorSegments.contains(es1) && errorSegments.contains(es2))
    245                             || !es1.intersects(es2)
    246                             || ignoreWaySegmentCombination(es1.way, es2.way)) {
     238                    if (!es1.intersects(es2) || ignoreWaySegmentCombination(es1.way, es2.way)) {
    247239                        continue;
    248240                    }
     
    279271     * @return A list with all the cells the segment crosses
    280272     */
    281     public List<List<WaySegment>> getSegments(EastNorth n1, EastNorth n2) {
     273    private List<List<WaySegment>> getSegments(EastNorth n1, EastNorth n2) {
    282274
    283275        List<List<WaySegment>> cells = new ArrayList<>();
Note: See TracChangeset for help on using the changeset viewer.