diff options
author | tron <tron@openttd.org> | 2006-06-10 08:37:41 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-10 08:37:41 +0000 |
commit | 0a72639c2d7254c37cd6f8ab0a9fa0f4d63fd2ea (patch) | |
tree | ddcc7798b94be03152e4b31cee4bf48bc73774e4 /train_gui.c | |
parent | 15c945c9263ffd64f01fd3da92fcb4efb17fe691 (diff) | |
download | openttd-0a72639c2d7254c37cd6f8ab0a9fa0f4d63fd2ea.tar.xz |
(svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
Diffstat (limited to 'train_gui.c')
-rw-r--r-- | train_gui.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/train_gui.c b/train_gui.c index cc6f240b8..be6c147d9 100644 --- a/train_gui.c +++ b/train_gui.c @@ -340,7 +340,7 @@ static void ShowBuildTrainWindow(TileIndex tile) w->widget[2].unkA = (w->vscroll.cap << 8) + 1; w->resize.step_height = 14; - w->resize.height = w->height - 14 * 4; /* Minimum of 4 vehicles in the display */ + w->resize.height = w->height - 14 * 4; // Minimum of 4 vehicles in the display if (tile != 0) { w->caption_color = GetTileOwner(tile); @@ -1049,10 +1049,9 @@ static void TrainViewWndProc(Window *w, WindowEvent *e) break; case WE_MOUSELOOP: { - Vehicle *v; + const Vehicle* v = GetVehicle(w->window_number); uint32 h; - v = GetVehicle(w->window_number); assert(v->type == VEH_Train); h = CheckTrainStoppedInDepot(v) >= 0 ? (1 << 9)| (1 << 7) : (1 << 12) | (1 << 13); if (h != w->hidden_state) { |