station_cmd.c
changeset 3033 9cba043eb38f
parent 3032 5c51101e91c6
child 3047 2880aef0ee9d
--- a/station_cmd.c	Sat Feb 18 14:11:23 2006 +0000
+++ b/station_cmd.c	Sat Feb 18 14:41:24 2006 +0000
@@ -1623,12 +1623,12 @@
 		{
 			const byte *b = _airport_map5_tiles[p1];
 
-			BEGIN_TILE_LOOP(tile_cur,w,h,tile) {
+			BEGIN_TILE_LOOP(tile_cur, w, h, tile) {
 				ModifyTile(tile_cur,
 					MP_SETTYPE(MP_STATION) | MP_MAPOWNER_CURRENT |
 					MP_MAP2 | MP_MAP3LO_CLEAR | MP_MAP3HI_CLEAR | MP_MAP5,
 					st->index, *b++);
-			} END_TILE_LOOP(tile_cur,w,h,tile)
+			} END_TILE_LOOP(tile_cur, w, h, tile)
 		}
 
 		UpdateStationVirtCoordDirty(st);
@@ -1655,24 +1655,24 @@
 
 	cost = w * h * _price.remove_airport;
 
-	{
-BEGIN_TILE_LOOP(tile_cur,w,h,tile)
-		if (!EnsureNoVehicle(tile_cur))
-			return CMD_ERROR;
+	BEGIN_TILE_LOOP(tile_cur, w, h, tile) {
+		if (!EnsureNoVehicle(tile_cur)) return CMD_ERROR;
 
 		if (flags & DC_EXEC) {
 			DeleteAnimatedTile(tile_cur);
 			DoClearSquare(tile_cur);
 		}
-END_TILE_LOOP(tile_cur, w,h,tile)
-	}
+	} END_TILE_LOOP(tile_cur, w,h,tile)
 
 	if (flags & DC_EXEC) {
 		const AirportFTAClass *afc = GetAirport(st->airport_type);
 		uint i;
 
-		for (i = 0; i < afc->nof_depots; ++i)
-			DeleteWindowById(WC_VEHICLE_DEPOT, tile + ToTileIndexDiff(afc->airport_depots[i]));
+		for (i = 0; i < afc->nof_depots; ++i) {
+			DeleteWindowById(
+				WC_VEHICLE_DEPOT, tile + ToTileIndexDiff(afc->airport_depots[i])
+			);
+		}
 
 		st->airport_tile = 0;
 		st->facilities &= ~FACIL_AIRPORT;
@@ -2156,6 +2156,7 @@
 	}
 }
 
+
 static void ClickTile_Station(TileIndex tile)
 {
   // 0x20 - hangar large airport (32)
@@ -2297,7 +2298,7 @@
 static void CheckOrphanedSlots(const Station *st, RoadStopType rst)
 {
 	RoadStop *rs;
-	int k;
+	uint k;
 
 	for (rs = GetPrimaryRoadStop(st, rst); rs != NULL; rs = rs->next) {
 		for (k = 0; k < NUM_SLOTS; k++) {
@@ -2934,10 +2935,10 @@
 
 		// this means it's an oldstyle savegame without support for nonuniform stations
 		if (st->train_tile != 0 && st->trainst_h == 0) {
-			int w = GB(st->trainst_w, 4, 4);
-			int h = GB(st->trainst_w, 0, 4);
-
-			if (_m[st->train_tile].m5 & 1) intswap(w, h);
+			uint w = GB(st->trainst_w, 4, 4);
+			uint h = GB(st->trainst_w, 0, 4);
+
+			if (_m[st->train_tile].m5 & 1) uintswap(w, h);
 			st->trainst_w = w;
 			st->trainst_h = h;
 		}