Ignore:
Timestamp:
2024-09-19T20:33:13+02:00 (4 months ago)
Author:
taylor.smock
Message:

PhotoAdjust: Use Collection#removeIf instead of an iterator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustMapMode.java

    r35592 r36342  
    242242    private static List<GeoImageLayer> getVisibleGeoImageLayers() {
    243243        List<GeoImageLayer> all = new ArrayList<>(MainApplication.getLayerManager().getLayersOfType(GeoImageLayer.class));
    244         Iterator<GeoImageLayer> it = all.iterator();
    245         while (it.hasNext()) {
    246             if (!it.next().isVisible()) it.remove();
    247         }
     244        all.removeIf(geoImageLayer -> !geoImageLayer.isVisible());
    248245        return all;
    249246    }
Note: See TracChangeset for help on using the changeset viewer.