From 6040e559ce67599626951f5e16f3754cfa393319 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 8 Mar 2007 19:23:49 +0000 Subject: (svn r9069) -Codechange: Change a do ... while loop with a for loop. This fixes some warning that I never got anyway... --- src/station_gui.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/station_gui.cpp') 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; -- cgit v1.2.3-54-g00ecf