Changeset 15056 in josm


Ignore:
Timestamp:
2019-05-06T07:08:02+02:00 (6 years ago)
Author:
GerdP
Message:

remove duplicated code to calculate bounding box

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Geometry.java

    r15055 r15056  
    107107        for (int pos = 0; pos < n; pos++) {
    108108            newNodes[pos] = new ArrayList<>(ways.get(pos).getNodes());
    109             wayBounds[pos] = getNodesBounds(newNodes[pos]);
     109            wayBounds[pos] = ways.get(pos).getBBox();
    110110            changedWays[pos] = false;
    111111        }
     
    241241
    242242        return intersectionNodes;
    243     }
    244 
    245     private static BBox getNodesBounds(List<Node> nodes) {
    246 
    247         BBox bounds = new BBox(nodes.get(0));
    248         for (Node n: nodes) {
    249             bounds.add(n);
    250         }
    251         return bounds;
    252243    }
    253244
Note: See TracChangeset for help on using the changeset viewer.