From 47137cefb72d3b3d3bc6fdefc7a4b103429f6d46 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 23 Oct 2005 13:04:44 +0000 Subject: (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 --- aircraft_gui.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'aircraft_gui.c') diff --git a/aircraft_gui.c b/aircraft_gui.c index 522a6535b..4bea5c350 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -1063,10 +1063,11 @@ static void PlayerAircraftWndProc(Window *w, WindowEvent *e) DrawVehicleProfitButton(v, x, y + 13); SetDParam(0, v->unitnumber); - if (IsAircraftHangarTile(v->tile) && (v->vehstatus & VS_HIDDEN)) + if (IsAircraftHangarTile(v->tile) && (v->vehstatus & VS_HIDDEN)) { str = STR_021F; - else + } else { str = v->age > v->max_age - 366 ? STR_00E3 : STR_00E2; + } DrawString(x, y + 2, str, 0); SetDParam(0, v->profit_this_year); @@ -1100,7 +1101,7 @@ static void PlayerAircraftWndProc(Window *w, WindowEvent *e) case 7: { /* Matrix to show vehicles */ uint32 id_v = (e->click.pt.y - PLY_WND_PRC__OFFSET_TOP_WIDGET) / PLY_WND_PRC__SIZE_OF_ROW_BIG; - if (id_v >= w->vscroll.cap) { return;} // click out of bounds + if (id_v >= w->vscroll.cap) return; // click out of bounds id_v += w->vscroll.pos; -- cgit v1.2.3-54-g00ecf