(svn r9069) -Codechange: Change a do ... while loop with a for loop. This fixes some warning that I never got anyway...
authorpeter1138
Thu, 08 Mar 2007 19:23:49 +0000
changeset 6586 2c91b61219e1
parent 6585 7da94b26498a
child 6587 bc0bd6259485
(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
--- a/src/station_gui.cpp	Thu Mar 08 16:27:54 2007 +0000
+++ b/src/station_gui.cpp	Thu Mar 08 19:23:49 2007 +0000
@@ -640,8 +640,7 @@
 		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 @@
 				y += 10;
 			}
 		}
-	} while (pos > -5 && ++i != NUM_CARGO);
+	}
 
 	if (IsWindowOfPrototype(w, _station_view_widgets)) {
 		char *b = _userstring;