src/station_cmd.cpp
changeset 6350 04b19f551aec
parent 6329 a492d5e61d7b
child 6357 f0f5e7d1713c
--- a/src/station_cmd.cpp	Wed Mar 21 11:50:34 2007 +0000
+++ b/src/station_cmd.cpp	Wed Mar 21 13:19:01 2007 +0000
@@ -352,7 +352,7 @@
 {
 	uint mask = 0;
 
-	for (uint i = 0; i != NUM_CARGO; i++) {
+	for (CargoID i = 0; i < NUM_CARGO; i++) {
 		if (st->goods[i].waiting_acceptance & 0x8000) mask |= 1 << i;
 	}
 	return mask;
@@ -525,7 +525,7 @@
 	}
 
 	// Adjust in case our station only accepts fewer kinds of goods
-	for (uint i = 0; i != NUM_CARGO; i++) {
+	for (CargoID i = 0; i < NUM_CARGO; i++) {
 		uint amt = min(accepts[i], 15);
 
 		// Make sure the station can accept the goods type.
@@ -2336,7 +2336,7 @@
 	FOR_ALL_STATIONS(st) {
 		if (st->owner == owner &&
 				DistanceManhattan(tile, st->xy) <= radius) {
-			for (uint i = 0; i != NUM_CARGO; i++) {
+			for (CargoID i = 0; i < NUM_CARGO; i++) {
 				GoodsEntry* ge = &st->goods[i];
 
 				if (ge->enroute_from != INVALID_STATION) {
@@ -2347,7 +2347,7 @@
 	}
 }
 
-static void UpdateStationWaiting(Station *st, int type, uint amount)
+static void UpdateStationWaiting(Station *st, CargoID type, uint amount)
 {
 	SB(st->goods[type].waiting_acceptance, 0, 12,
 		min(0xFFF, GB(st->goods[type].waiting_acceptance, 0, 12) + amount)
@@ -2391,7 +2391,7 @@
 }
 
 
-uint MoveGoodsToStation(TileIndex tile, int w, int h, int type, uint amount)
+uint MoveGoodsToStation(TileIndex tile, int w, int h, CargoID type, uint amount)
 {
 	Station* around[8];
 
@@ -2553,7 +2553,7 @@
 	st->facilities = FACIL_AIRPORT | FACIL_DOCK;
 	st->build_date = _date;
 
-	for (uint j = 0; j != NUM_CARGO; j++) {
+	for (CargoID j = 0; j < NUM_CARGO; j++) {
 		st->goods[j].waiting_acceptance = 0;
 		st->goods[j].days_since_pickup = 0;
 		st->goods[j].enroute_from = INVALID_STATION;
@@ -2801,7 +2801,7 @@
 static void SaveLoad_STNS(Station *st)
 {
 	SlObject(st, _station_desc);
-	for (uint i = 0; i != NUM_CARGO; i++) {
+	for (CargoID i = 0; i < NUM_CARGO; i++) {
 		SlObject(&st->goods[i], _goods_desc);
 	}