Changeset 15906 in josm
- Timestamp:
- 2020-02-23T00:29:48+01:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java
r15557 r15906 22 22 import org.openstreetmap.josm.data.osm.Way; 23 23 import org.openstreetmap.josm.tools.Geometry; 24 import org.openstreetmap.josm.tools.Utils; 24 25 25 26 /** … … 48 49 // Make a deep copy of the ways, keeping the copied ways connected 49 50 // TODO: This assumes the first/last nodes of the ways are the only possible shared nodes. 50 Map<Node, Node> splitNodeMap = new HashMap<>( sourceWays.size());51 Map<Node, Node> splitNodeMap = new HashMap<>(Utils.hashMapInitialCapacity(sourceWays.size())); 51 52 for (Way w : sourceWays) { 52 53 copyNodeInMap(splitNodeMap, w.firstNode(), copyTags); -
trunk/src/org/openstreetmap/josm/data/StructUtils.java
r15121 r15906 34 34 import org.openstreetmap.josm.tools.MultiMap; 35 35 import org.openstreetmap.josm.tools.ReflectionUtils; 36 import org.openstreetmap.josm.tools.Utils; 36 37 37 38 /** … … 270 271 try (JsonReader reader = Json.createReader(new StringReader(s))) { 271 272 JsonObject object = reader.readObject(); 272 ret = new HashMap( object.size());273 ret = new HashMap(Utils.hashMapInitialCapacity(object.size())); 273 274 for (Map.Entry<String, JsonValue> e: object.entrySet()) { 274 275 JsonValue value = e.getValue(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r15876 r15906 1085 1085 protected void deleteTags(int... rows) { 1086 1086 // convert list of rows to HashMap (and find gap for nextKey) 1087 Map<String, String> tags = new HashMap<>( rows.length);1087 Map<String, String> tags = new HashMap<>(Utils.hashMapInitialCapacity(rows.length)); 1088 1088 int nextKeyIndex = rows[0]; 1089 1089 for (int row : rows) { -
trunk/src/org/openstreetmap/josm/tools/ImageResource.java
r13652 r15906 31 31 * Caches the image data for resized versions of the same image. 32 32 */ 33 private final Map<Dimension, BufferedImage> imgCache = new HashMap<>( );33 private final Map<Dimension, BufferedImage> imgCache = new HashMap<>(4); 34 34 /** 35 35 * SVG diagram information in case of SVG vector image.
Note:
See TracChangeset
for help on using the changeset viewer.