diff options
author | tron <tron@openttd.org> | 2005-10-23 13:04:44 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-10-23 13:04:44 +0000 |
commit | 181d586a7c13a296a1b9355e15e55dda7ac0fcb2 (patch) | |
tree | 7a8d1fbbe0d0d6ee2c8e981c57be6a9003505e97 /station_gui.c | |
parent | 0b936c3222b3945f738885c6c7db3b46363ec6fe (diff) | |
download | openttd-181d586a7c13a296a1b9355e15e55dda7ac0fcb2.tar.xz |
(svn r3078) Some more stuff, which piled up:
- const, whitespace, indentation, bracing, GB/SB, pointless casts
- use the trinary operator where appropriate
- data types (uint[] -> AcceptedCargo, ...)
- if cascade -> switch
- if (ptr) -> if (ptr != NULL)
- DeMorgan's Law
- Fix some comments
- 0 -> '\0', change magic numbers to symbolic constants
Diffstat (limited to 'station_gui.c')
-rw-r--r-- | station_gui.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/station_gui.c b/station_gui.c index 91b706411..568416bbe 100644 --- a/station_gui.c +++ b/station_gui.c @@ -264,7 +264,7 @@ void ShowPlayerStations(PlayerID player) Window *w; w = AllocateWindowDescFront(&_player_stations_desc, player); - if (w) { + if (w != NULL) { w->caption_color = (byte)w->window_number; w->vscroll.cap = 12; w->resize.step_height = 10; @@ -500,13 +500,13 @@ static void StationViewWndProc(Window *w, WindowEvent *e) } break; - case WE_ON_EDIT_TEXT: { + case WE_ON_EDIT_TEXT: if (e->edittext.str[0] != '\0') { _cmd_text = e->edittext.str; DoCommandP(0, w->window_number, 0, NULL, CMD_RENAME_STATION | CMD_MSG(STR_3031_CAN_T_RENAME_STATION)); } - } break; + break; case WE_DESTROY: { WindowNumber wno = @@ -535,7 +535,7 @@ void ShowStationViewWindow(StationID station) Window *w; w = AllocateWindowDescFront(&_station_view_desc, station); - if (w) { + if (w != NULL) { PlayerID owner = GetStation(w->window_number)->owner; if (owner != OWNER_NONE) w->caption_color = owner; w->vscroll.cap = 5; |