diff options
author | peter1138 <peter1138@openttd.org> | 2007-03-21 13:19:01 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-03-21 13:19:01 +0000 |
commit | d7f56f1550ad463c6584595675dbebf745c30a78 (patch) | |
tree | e15177888ccaf427ebf30cc793b6da2908c47a8f /src/station_gui.cpp | |
parent | a9651a8b8f1e9b1f6524721a43e58a2339fc8d61 (diff) | |
download | openttd-d7f56f1550ad463c6584595675dbebf745c30a78.tar.xz |
(svn r9388) -Codechange: variable scope and type, and standardify all CargoID loops.
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r-- | src/station_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 309e311a1..095ea4295 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -364,7 +364,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e) x = DrawString(xb, y, STR_3049_0, 0) + 5; // show cargo waiting and station ratings - for (CargoID j = 0; j != NUM_CARGO; j++) { + for (CargoID j = 0; j < NUM_CARGO; j++) { uint amount = GB(st->goods[j].waiting_acceptance, 0, 12); if (amount != 0) { StationsWndShowStationRating(x, y, j, amount, st->goods[j].rating); @@ -677,7 +677,7 @@ static void DrawStationViewWindow(Window *w) StringID str; num = 1; - for (CargoID i = 0; i != NUM_CARGO; i++) { + for (CargoID i = 0; i < NUM_CARGO; i++) { if (GB(st->goods[i].waiting_acceptance, 0, 12) != 0) { num++; if (st->goods[i].enroute_from != station_id) num++; @@ -701,7 +701,7 @@ static void DrawStationViewWindow(Window *w) if (--pos < 0) { str = STR_00D0_NOTHING; - for (CargoID i = 0; i != NUM_CARGO; i++) { + for (CargoID i = 0; i < NUM_CARGO; i++) { if (GB(st->goods[i].waiting_acceptance, 0, 12) != 0) str = STR_EMPTY; } SetDParam(0, str); @@ -709,7 +709,7 @@ static void DrawStationViewWindow(Window *w) y += 10; } - for (CargoID i = 0; i != NUM_CARGO && pos > -5; i++) { + for (CargoID i = 0; i < NUM_CARGO && pos > -5; i++) { uint waiting = GB(st->goods[i].waiting_acceptance, 0, 12); if (waiting == 0) continue; @@ -753,7 +753,7 @@ static void DrawStationViewWindow(Window *w) b = InlineString(b, STR_000C_ACCEPTS); - for (CargoID i = 0; i != NUM_CARGO; i++) { + for (CargoID i = 0; i < NUM_CARGO; i++) { if (b >= endof(_userstring) - 5 - 1) break; if (st->goods[i].waiting_acceptance & 0x8000) { if (first) { @@ -776,7 +776,7 @@ static void DrawStationViewWindow(Window *w) DrawString(2, 67, STR_3034_LOCAL_RATING_OF_TRANSPORT, 0); y = 77; - for (CargoID i = 0; i != NUM_CARGO; i++) { + for (CargoID i = 0; i < NUM_CARGO; i++) { const CargoSpec *cs = GetCargo(i); if (!cs->IsValid()) continue; |