Ignore:
Timestamp:
2013-08-03T00:21:50+02:00 (11 years ago)
Author:
Don-vip
Message:

see #8902 - Small performance enhancements / coding style (patch by shinigami):

  • set init size for lists when obvious
Location:
trunk/src/org/openstreetmap/josm/gui/layer/geoimage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r6104 r6106  
    290290            panelTf.add(new JLabel(tr("I am in the timezone of: ")), gc);
    291291
    292             Vector<String> vtTimezones = new Vector<String>();
    293292            String[] tmp = TimeZone.getAvailableIDs();
     293            Vector<String> vtTimezones = new Vector<String>(tmp.length);
    294294
    295295            for (String tzStr : tmp) {
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r6093 r6106  
    837837
    838838    public List<ImageEntry> getImages() {
    839         List<ImageEntry> copy = new ArrayList<ImageEntry>();
     839        List<ImageEntry> copy = new ArrayList<ImageEntry>(data.size());
    840840        for (ImageEntry ie : data) {
    841841            copy.add(ie.clone());
Note: See TracChangeset for help on using the changeset viewer.