Changeset 12865 in josm for trunk/src/org/openstreetmap/josm/tools/ImageWarp.java
- Timestamp:
- 2017-09-15T01:20:41+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageWarp.java
r12798 r12865 91 91 92 92 private Point2D getValue(int xIdx, int yIdx) { 93 Map<Integer, Point2D> row = getRow(yIdx); 94 Point2D val = row.get(xIdx); 95 if (val == null) { 96 val = trfm.transform(new Point2D.Double(xIdx * stride, yIdx * stride)); 97 row.put(xIdx, val); 98 } 99 return val; 93 return getRow(yIdx).computeIfAbsent(xIdx, k -> trfm.transform(new Point2D.Double(xIdx * stride, yIdx * stride))); 100 94 } 101 95
Note:
See TracChangeset
for help on using the changeset viewer.