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

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

  • while -> foreach
  • for -> for each

plus:

  • cleanup of FileDrop class to make it more integrated into JOSM core + remove warnings
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r6093 r6104  
    391391    protected void setContentVisible(boolean visible) {
    392392        Component[] comps = getComponents();
    393         for(int i=0; i<comps.length; i++) {
    394             if (comps[i] != titleBar && (!visible || comps[i] != buttonsPanel || buttonHiding != ButtonHiddingType.ALWAYS_HIDDEN)) {
    395                 comps[i].setVisible(visible);
     393        for (Component comp : comps) {
     394            if (comp != titleBar && (!visible || comp != buttonsPanel || buttonHiding != ButtonHiddingType.ALWAYS_HIDDEN)) {
     395                comp.setVisible(visible);
    396396            }
    397397        }
Note: See TracChangeset for help on using the changeset viewer.