summaryrefslogtreecommitdiff
path: root/src/station_gui.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-03-08 19:23:49 +0000
committerpeter1138 <peter1138@openttd.org>2007-03-08 19:23:49 +0000
commit6040e559ce67599626951f5e16f3754cfa393319 (patch)
tree01c1913b9cb871846d408beae45cc49213009948 /src/station_gui.cpp
parentce919e8c719f0f698ac86dcaa528368316f2e52d (diff)
downloadopenttd-6040e559ce67599626951f5e16f3754cfa393319.tar.xz
(svn r9069) -Codechange: Change a do ... while loop with a for loop. This fixes some warning that I never got anyway...
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r--src/station_gui.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index f2ffb7cad..ee0d4ea12 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -640,8 +640,7 @@ static void DrawStationViewWindow(Window *w)
y += 10;
}
- CargoID i = 0;
- do {
+ for (CargoID i = 0; i != NUM_CARGO && pos > -5; i++) {
uint waiting = GB(st->goods[i].waiting_acceptance, 0, 12);
if (waiting == 0) continue;
@@ -677,7 +676,7 @@ static void DrawStationViewWindow(Window *w)
y += 10;
}
}
- } while (pos > -5 && ++i != NUM_CARGO);
+ }
if (IsWindowOfPrototype(w, _station_view_widgets)) {
char *b = _userstring;