src/train_gui.cpp
branchgamebalance
changeset 9906 6f41b8713b65
parent 9895 7bd07f43b0e3
child 6719 4cc327ad39d5
child 6918 5589c415e28f
--- a/src/train_gui.cpp	Sun Apr 01 09:38:43 2007 +0000
+++ b/src/train_gui.cpp	Thu Apr 19 14:43:25 2007 +0000
@@ -371,7 +371,6 @@
 	const Vehicle *u;
 	AcceptedCargo act_cargo;
 	AcceptedCargo max_cargo;
-	uint i;
 	int num;
 	int x;
 	int y;
@@ -380,7 +379,7 @@
 	num = 0;
 	u = v = GetVehicle(w->window_number);
 	if (det_tab == 3) { // Total cargo tab
-		for (i = 0; i < lengthof(act_cargo); i++) {
+		for (CargoID i = 0; i < lengthof(act_cargo); i++) {
 			act_cargo[i] = 0;
 			max_cargo[i] = 0;
 		}
@@ -393,7 +392,7 @@
 		/* Set scroll-amount seperately from counting, as to not compute num double
 		 * for more carriages of the same type
 		 */
-		for (i = 0; i != NUM_CARGO; i++) {
+		for (CargoID i = 0; i < NUM_CARGO; i++) {
 			if (max_cargo[i] > 0) num++; // only count carriages that the train has
 		}
 		num++; // needs one more because first line is description string
@@ -492,7 +491,7 @@
 	} else {
 		// draw total cargo tab
 		DrawString(x, y + 2, STR_013F_TOTAL_CAPACITY_TEXT, 0);
-		for (i = 0; i != NUM_CARGO; i++) {
+		for (CargoID i = 0; i < NUM_CARGO; i++) {
 			if (max_cargo[i] > 0 && --sel < 0 && sel > -w->vscroll.cap) {
 				y += 14;
 				SetDParam(0, i);            // {CARGO} #1