diff options
author | tron <tron@openttd.org> | 2005-11-13 14:54:09 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-11-13 14:54:09 +0000 |
commit | 4a14a586e2f457d38e9fede1a494478105a8acfd (patch) | |
tree | 0bcf189f35802c7769cd23e20ed58a18b59d9b2e /airport_gui.c | |
parent | ee15e3de13643b2d09abcc5424bf8e2d916cff75 (diff) | |
download | openttd-4a14a586e2f457d38e9fede1a494478105a8acfd.tar.xz |
(svn r3173) Use the trinary operator and switch to improve readability
Also align short cases nicely
Diffstat (limited to 'airport_gui.c')
-rw-r--r-- | airport_gui.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/airport_gui.c b/airport_gui.c index e219df930..a4c072b97 100644 --- a/airport_gui.c +++ b/airport_gui.c @@ -80,8 +80,7 @@ static void BuildAirToolbWndProc(Window *w, WindowEvent *e) case '1': BuildAirClick_Airport(w); break; case '2': BuildAirClick_Demolish(w); break; case 'l': BuildAirClick_Landscaping(w); break; - default: - return; + default: return; } } break; @@ -167,16 +166,16 @@ static void BuildAirportPickerWndProc(Window *w, WindowEvent *e) w->click_state = ((1<<3) << sel) | ((1<<8) << _station_show_coverage); SetTileSelectSize(_airport_size_x[sel],_airport_size_y[sel]); - if (_patches.modified_catchment) { - switch (sel) { - case AT_OILRIG: rad = CA_AIR_OILPAD; break; - case AT_HELIPORT: rad = CA_AIR_HELIPORT; break; - case AT_SMALL: rad = CA_AIR_SMALL; break; - case AT_LARGE: rad = CA_AIR_LARGE; break; - case AT_METROPOLITAN: rad = CA_AIR_METRO; break; - case AT_INTERNATIONAL: rad = CA_AIR_INTER; break; - } - } + if (_patches.modified_catchment) { + switch (sel) { + case AT_OILRIG: rad = CA_AIR_OILPAD; break; + case AT_HELIPORT: rad = CA_AIR_HELIPORT; break; + case AT_SMALL: rad = CA_AIR_SMALL; break; + case AT_LARGE: rad = CA_AIR_LARGE; break; + case AT_METROPOLITAN: rad = CA_AIR_METRO; break; + case AT_INTERNATIONAL: rad = CA_AIR_INTER; break; + } + } if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad); |