Ignore:
Timestamp:
2022-06-15T20:10:48+02:00 (3 years ago)
Author:
taylor.smock
Message:

See #22115: Extract methods from LatLon into ILatLon where they are generally applicable

This uses the extracted methods where possible, and removes unnecessary
Node#getCoor calls.

Location:
applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/DrawnPolyLine.java

    r34949 r35978  
    1010import java.util.Set;
    1111
     12import org.openstreetmap.josm.data.coor.ILatLon;
    1213import org.openstreetmap.josm.data.coor.LatLon;
    1314import org.openstreetmap.josm.gui.MapView;
     
    3839        List<LatLon> pts = getPoints();
    3940        Iterator<LatLon> it1, it2;
    40         LatLon pp1, pp2;
     41        ILatLon pp1, pp2;
    4142        if (pts.size() < 2) return 0;
    4243        it1 = pts.listIterator(0);
     
    368369        if (k > n) k = n;
    369370
    370         LatLon pp1, pp2 = null;
     371        ILatLon pp1, pp2 = null;
    371372        Iterator<LatLon> it1, it2;
    372373        it1 = pts.listIterator(0);
  • applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java

    r35864 r35978  
    560560            // there may be a node with the same coords!
    561561
    562             if (nd != null && p.greatCircleDistance(nd.getCoor()) > 0.01) nd = null;
     562            if (nd != null && p.greatCircleDistance(nd) > 0.01) nd = null;
    563563            if (nd == null) {
    564564                if (i > 0 && p.equals(first)) {
Note: See TracChangeset for help on using the changeset viewer.