Changeset 30689 in osm for applications/editors/josm


Ignore:
Timestamp:
2014-09-24T02:12:25+02:00 (10 years ago)
Author:
donvip
Message:

[josm_simplifyarea] code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/simplifyarea/src/sk/zdila/josm/plugin/simplify/SimplifyAreaAction.java

    r30687 r30689  
    119119        }
    120120
    121         class Count {
    122             int count;
    123         }
    124 
    125         final Map<Node, Count> nodeCountMap = new HashMap<>();
     121        final Map<Node, Integer> nodeCountMap = new HashMap<>();
    126122        for (final Node node : nodesToDelete) {
    127             Count count = nodeCountMap.get(node);
     123            Integer count = nodeCountMap.get(node);
    128124            if (count == null) {
    129                 count = new Count();
    130                 nodeCountMap.put(node, count);
    131             }
    132             count.count++;
     125                count = 0;
     126            }
     127            nodeCountMap.put(node, ++count);
    133128        }
    134129
    135130        final Collection<Node> nodesReallyToRemove = new ArrayList<>();
    136131
    137         for (final Entry<Node, Count> entry : nodeCountMap.entrySet()) {
     132        for (final Entry<Node, Integer> entry : nodeCountMap.entrySet()) {
    138133            final Node node = entry.getKey();
    139             final int count = entry.getValue().count;
     134            final Integer count = entry.getValue();
    140135
    141136            if (!node.isTagged() && node.getReferrers().size() == count) {
Note: See TracChangeset for help on using the changeset viewer.