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


Ignore:
Timestamp:
2011-04-21T00:12:51+02:00 (13 years ago)
Author:
stoecker
Message:

fix last checkin a bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/Way.java

    r4053 r4054  
    7575        Node last = null;
    7676        int count = nodes.size();
    77         for(int i = 0; i < count && count > 2; ++i) {
     77        for(int i = 0; i < count && count > 2;) {
    7878            Node n = nodes.get(i);
    7979            if(last == n) {
    8080                nodes.remove(i);
    8181                --count;
    82             }
    83             last = n;
     82            } else {
     83                last = n;
     84                ++i;
     85            }
    8486        }
    8587        return nodes;
Note: See TracChangeset for help on using the changeset viewer.