(svn r12762) -Fix: tabs after the first non-tab character are generally not okay (or lines starting with a space and then tabs).
authorrubidium
Fri, 18 Apr 2008 04:54:09 +0000
changeset 10230 bf81856a1101
parent 10229 fba3f9fa44d7
child 10231 8c073d6e163d
(svn r12762) -Fix: tabs after the first non-tab character are generally not okay (or lines starting with a space and then tabs).
src/ai/default/default.cpp
src/group_gui.cpp
src/intro_gui.cpp
src/network/network_udp.cpp
src/newgrf_industries.cpp
src/news_gui.cpp
src/signal.cpp
src/station_cmd.cpp
src/timetable_cmd.cpp
src/town_cmd.cpp
src/vehicle.cpp
src/waypoint.cpp
src/win32.cpp
--- a/src/ai/default/default.cpp	Fri Apr 18 04:37:06 2008 +0000
+++ b/src/ai/default/default.cpp	Fri Apr 18 04:54:09 2008 +0000
@@ -3097,7 +3097,7 @@
 		Axis axis = (TileX(t1) == TileX(t2) ? AXIS_Y : AXIS_X);
 
 		/* try to build a long road instead of bridge - CMD_BUILD_LONG_ROAD has to fail if it couldn't build at least one piece! */
- 		CommandCost cost = DoCommand(t2, t1, (t2 < t1 ? 1 : 2) | (axis << 2) | (ROADTYPE_ROAD << 3), DC_AUTO | DC_NO_WATER, CMD_BUILD_LONG_ROAD);
+		CommandCost cost = DoCommand(t2, t1, (t2 < t1 ? 1 : 2) | (axis << 2) | (ROADTYPE_ROAD << 3), DC_AUTO | DC_NO_WATER, CMD_BUILD_LONG_ROAD);
 
 		if (CmdSucceeded(cost) && cost.GetCost() <= p->player_money) {
 			DoCommand(t2, t1, (t2 < t1 ? 1 : 2) | (axis << 2) | (ROADTYPE_ROAD << 3), DC_AUTO | DC_EXEC | DC_NO_WATER, CMD_BUILD_LONG_ROAD);
--- a/src/group_gui.cpp	Fri Apr 18 04:37:06 2008 +0000
+++ b/src/group_gui.cpp	Fri Apr 18 04:54:09 2008 +0000
@@ -206,7 +206,7 @@
 	w->widget[GRP_WIDGET_LIST_VEHICLE].data = (w->vscroll2.cap << 8) + 1;
 
 	switch (gv->vehicle_type) {
-		default: NOT_REACHED(); break;
+		default: NOT_REACHED();
 		case VEH_TRAIN:    gv->_sorting = &_sorting.train;    break;
 		case VEH_ROAD:     gv->_sorting = &_sorting.roadveh;  break;
 		case VEH_SHIP:     gv->_sorting = &_sorting.ship;     break;
@@ -217,11 +217,11 @@
 	gv->vehicle_type = (VehicleType)GB(w->window_number, 11, 5);
 	gv->l.sort_type = gv->_sorting->criteria;
 	gv->l.flags = VL_REBUILD | (gv->_sorting->order ? VL_DESC : VL_NONE);
-	gv->l.resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;	// Set up resort timer
+	gv->l.resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS; // Set up resort timer
 
 	gl->sort_list = NULL;
 	gl->l.flags = VL_REBUILD | VL_NONE;
-	gl->l.resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;	// Set up resort timer
+	gl->l.resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS; // Set up resort timer
 
 	gv->group_sel = ALL_GROUP;
 	gv->vehicle_sel = INVALID_VEHICLE;
@@ -398,7 +398,7 @@
 						w->widget[GRP_WIDGET_CAPTION].data =  STR_A009_AIRCRAFT;
 						w->widget[GRP_WIDGET_REPLACE_PROTECTION].data = SPR_GROUP_REPLACE_OFF_AIRCRAFT;
 						break;
-					default: NOT_REACHED(); break;
+					default: NOT_REACHED();
 				}
 			} else {
 				const Group *g = GetGroup(gv->group_sel);
@@ -423,7 +423,7 @@
 						w->widget[GRP_WIDGET_CAPTION].data = STR_GROUP_AIRCRAFTS_CAPTION;
 						w->widget[GRP_WIDGET_REPLACE_PROTECTION].data = (g->replace_protection) ? SPR_GROUP_REPLACE_ON_AIRCRAFT : SPR_GROUP_REPLACE_OFF_AIRCRAFT;
 						break;
-					default: NOT_REACHED(); break;
+					default: NOT_REACHED();
 				}
 			}
 
@@ -453,7 +453,7 @@
 					str_all_veh = STR_GROUP_ALL_AIRCRAFTS;
 					str_no_group_veh = STR_GROUP_DEFAULT_AIRCRAFTS;
 					break;
-				default: NOT_REACHED(); break;
+				default: NOT_REACHED();
 			}
 			DrawString(10, y1, str_all_veh, IsAllGroupID(gv->group_sel) ? TC_WHITE : TC_BLACK);
 
@@ -600,7 +600,7 @@
 
 					SetDParam(0, g->index);
 					ShowQueryString(STR_GROUP_NAME, STR_GROUP_RENAME_CAPTION, 31, 150, w, CS_ALPHANUMERAL);
-				}	break;
+				} break;
 
 
 				case GRP_WIDGET_AVAILABLE_VEHICLES:
--- a/src/intro_gui.cpp	Fri Apr 18 04:37:06 2008 +0000
+++ b/src/intro_gui.cpp	Fri Apr 18 04:54:09 2008 +0000
@@ -106,7 +106,7 @@
 					}
 					break;
 
-				case SGI_TEMPERATE_LANDSCAPE:	case SGI_ARCTIC_LANDSCAPE:
+				case SGI_TEMPERATE_LANDSCAPE: case SGI_ARCTIC_LANDSCAPE:
 				case SGI_TROPIC_LANDSCAPE: case SGI_TOYLAND_LANDSCAPE:
 					w->RaiseWidget(_opt_newgame.landscape + SGI_TEMPERATE_LANDSCAPE);
 					SetNewLandscapeType(e->we.click.widget - SGI_TEMPERATE_LANDSCAPE);
--- a/src/network/network_udp.cpp	Fri Apr 18 04:37:06 2008 +0000
+++ b/src/network/network_udp.cpp	Fri Apr 18 04:54:09 2008 +0000
@@ -293,7 +293,7 @@
 
 		for (c = item->info.grfconfig; c != NULL; c = c->next) {
 			if (c->status == GCS_NOT_FOUND) item->info.compatible = false;
- 			if (c->status != GCS_NOT_FOUND || strcmp(c->name, UNKNOWN_GRF_NAME_PLACEHOLDER) != 0) continue;
+			if (c->status != GCS_NOT_FOUND || strcmp(c->name, UNKNOWN_GRF_NAME_PLACEHOLDER) != 0) continue;
 			in_request[in_request_count] = c;
 			in_request_count++;
 		}
--- a/src/newgrf_industries.cpp	Fri Apr 18 04:37:06 2008 +0000
+++ b/src/newgrf_industries.cpp	Fri Apr 18 04:54:09 2008 +0000
@@ -287,7 +287,7 @@
 		/* Distance of nearest industry of given type */
 		case 0x64: return GetClosestIndustry(tile, MapNewGRFIndustryType(parameter, indspec->grf_prop.grffile->grfid), industry);
 		/* Get town zone and Manhattan distance of closest town */
- 		case 0x65: return GetTownRadiusGroup(industry->town, tile) << 16 | min(DistanceManhattan(tile, industry->town->xy), 0xFFFF);
+		case 0x65: return GetTownRadiusGroup(industry->town, tile) << 16 | min(DistanceManhattan(tile, industry->town->xy), 0xFFFF);
 		/* Get square of Euclidian distance of closes town */
 		case 0x66: return GetTownRadiusGroup(industry->town, tile) << 16 | min(DistanceSquare(tile, industry->town->xy), 0xFFFF);
 
--- a/src/news_gui.cpp	Fri Apr 18 04:37:06 2008 +0000
+++ b/src/news_gui.cpp	Fri Apr 18 04:54:09 2008 +0000
@@ -402,20 +402,20 @@
 };
 
 static const SoundFx _news_sounds[NT_END] = {
-	SND_1D_APPLAUSE,	///< NT_ARRIVAL_PLAYER
-	SND_1D_APPLAUSE,	///< NT_ARRIVAL_OTHER
-	SND_BEGIN,		///< NT_ACCIDENT
-	SND_BEGIN,		///< NT_COMPANY_INFO
-	SND_BEGIN,		///< NT_OPENCLOSE
-	SND_BEGIN,		///< NT_ECONOMY
-	SND_BEGIN,		///< NT_INDUSTRY_PLAYER
-	SND_BEGIN,		///< NT_INDUSTRY_OTHER
-	SND_BEGIN,		///< NT_INDUSTRY_NOBODY
-	SND_BEGIN,		///< NT_ADVICE
-	SND_1E_OOOOH,		///< NT_NEW_VEHICLES
-	SND_BEGIN,		///< NT_ACCEPTANCE
-	SND_BEGIN,		///< NT_SUBSIDIES
-	SND_BEGIN,		///< NT_GENERAL
+	SND_1D_APPLAUSE, ///< NT_ARRIVAL_PLAYER
+	SND_1D_APPLAUSE, ///< NT_ARRIVAL_OTHER
+	SND_BEGIN,       ///< NT_ACCIDENT
+	SND_BEGIN,       ///< NT_COMPANY_INFO
+	SND_BEGIN,       ///< NT_OPENCLOSE
+	SND_BEGIN,       ///< NT_ECONOMY
+	SND_BEGIN,       ///< NT_INDUSTRY_PLAYER
+	SND_BEGIN,       ///< NT_INDUSTRY_OTHER
+	SND_BEGIN,       ///< NT_INDUSTRY_NOBODY
+	SND_BEGIN,       ///< NT_ADVICE
+	SND_1E_OOOOH,    ///< NT_NEW_VEHICLES
+	SND_BEGIN,       ///< NT_ACCEPTANCE
+	SND_BEGIN,       ///< NT_SUBSIDIES
+	SND_BEGIN,       ///< NT_GENERAL
 };
 
 const char *_news_display_name[NT_END] = {
--- a/src/signal.cpp	Fri Apr 18 04:37:06 2008 +0000
+++ b/src/signal.cpp	Fri Apr 18 04:54:09 2008 +0000
@@ -422,11 +422,11 @@
 			/* train in the segment */
 			newstate = SIGNAL_STATE_RED;
 		} else {
- 			/* is it a bidir combo? - then do not count its other signal direction as exit */
+			/* is it a bidir combo? - then do not count its other signal direction as exit */
 			if (sig == SIGTYPE_COMBO && HasSignalOnTrackdir(tile, ReverseTrackdir(trackdir))) {
 				/* at least one more exit */
 				if (flags & SF_EXIT2 &&
- 						/* no green exit */
+						/* no green exit */
 						(!(flags & SF_GREEN) ||
 						/* only one green exit, and it is this one - so all other exits are red */
 						(!(flags & SF_GREEN2) && GetSignalStateByTrackdir(tile, ReverseTrackdir(trackdir)) == SIGNAL_STATE_GREEN))) {
@@ -507,7 +507,7 @@
 			case MP_STATION:
 			case MP_ROAD:
 				if ((TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, 0)) & _enterdir_to_trackbits[dir]) != TRACK_BIT_NONE) {
- 					/* only add to set when there is some 'interesting' track */
+					/* only add to set when there is some 'interesting' track */
 					_tbdset.Add(tile, dir);
 					_tbdset.Add(tile + TileOffsByDiagDir(dir), ReverseDiagDir(dir));
 					break;
--- a/src/station_cmd.cpp	Fri Apr 18 04:37:06 2008 +0000
+++ b/src/station_cmd.cpp	Fri Apr 18 04:54:09 2008 +0000
@@ -435,13 +435,13 @@
 }
 
 /**
-* Get a list of the cargo types being produced around the tile (in a rectangle).
-* @param produced: Destination array of produced cargo
-* @param tile: Center of the search area
-* @param w: Width of the center
-* @param h: Height of the center
-* @param rad: Radius of the search area
-*/
+ * Get a list of the cargo types being produced around the tile (in a rectangle).
+ * @param produced: Destination array of produced cargo
+ * @param tile: Center of the search area
+ * @param w: Width of the center
+ * @param h: Height of the center
+ * @param rad: Radius of the search area
+ */
 void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile,
 	int w, int h, int rad)
 {
@@ -484,13 +484,13 @@
 }
 
 /**
-* Get a list of the cargo types that are accepted around the tile.
-* @param accepts: Destination array of accepted cargo
-* @param tile: Center of the search area
-* @param w: Width of the center
-* @param h: Height of the center
-* @param rad: Radius of the rectangular search area
-*/
+ * Get a list of the cargo types that are accepted around the tile.
+ * @param accepts: Destination array of accepted cargo
+ * @param tile: Center of the search area
+ * @param w: Width of the center
+ * @param h: Height of the center
+ * @param rad: Radius of the rectangular search area
+ */
 void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile,
 	int w, int h, int rad)
 {
@@ -1188,7 +1188,7 @@
 
 		/* Do not allow removing from stations if non-uniform stations are not enabled
 		 * The check must be here to give correct error message
- 		 */
+		 */
 		if (!_patches.nonuniform_stations) return_cmd_error(STR_NONUNIFORM_STATIONS_DISALLOWED);
 
 		/* If we reached here, the tile is valid so increase the quantity of tiles we will remove */
@@ -2770,10 +2770,10 @@
 
 uint MoveGoodsToStation(TileIndex tile, int w, int h, CargoID type, uint amount)
 {
-	Station *st1 = NULL;	// Station with best rating
-	Station *st2 = NULL;	// Second best station
-	uint best_rating1 = 0;	// rating of st1
-	uint best_rating2 = 0;	// rating of st2
+	Station *st1 = NULL;   // Station with best rating
+	Station *st2 = NULL;   // Second best station
+	uint best_rating1 = 0; // rating of st1
+	uint best_rating2 = 0; // rating of st2
 
 	StationSet all_stations = FindStationsAroundIndustryTile(tile, w, h);
 	for (StationSet::iterator st_iter = all_stations.begin(); st_iter != all_stations.end(); ++st_iter) {
--- a/src/timetable_cmd.cpp	Fri Apr 18 04:37:06 2008 +0000
+++ b/src/timetable_cmd.cpp	Fri Apr 18 04:54:09 2008 +0000
@@ -160,15 +160,15 @@
 	if (!_patches.timetabling) return;
 
 	/* Make sure the timetable only starts when the vehicle reaches the first
- 	 * order, not when travelling from the depot to the first station. */
- 	if (v->cur_order_index == 0 && !HasBit(v->vehicle_flags, VF_TIMETABLE_STARTED)) {
- 		SetBit(v->vehicle_flags, VF_TIMETABLE_STARTED);
- 		return;
- 	}
+	 * order, not when travelling from the depot to the first station. */
+	if (v->cur_order_index == 0 && !HasBit(v->vehicle_flags, VF_TIMETABLE_STARTED)) {
+		SetBit(v->vehicle_flags, VF_TIMETABLE_STARTED);
+		return;
+	}
 
 	if (!HasBit(v->vehicle_flags, VF_TIMETABLE_STARTED)) return;
 
- 	if (HasBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE)) {
+	if (HasBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE)) {
 		if (timetabled == 0) {
 			/* Round the time taken up to the nearest day, as this will avoid
 			 * confusion for people who are timetabling in days, and can be
@@ -182,7 +182,7 @@
 			 * assume that autofill is finished and turn it off again. */
 			ClrBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE);
 		}
- 	}
+	}
 
 	/* Vehicles will wait at stations if they arrive early even if they are not
 	 * timetabled to wait there, so make sure the lateness counter is updated
--- a/src/town_cmd.cpp	Fri Apr 18 04:37:06 2008 +0000
+++ b/src/town_cmd.cpp	Fri Apr 18 04:54:09 2008 +0000
@@ -1064,7 +1064,7 @@
 
 			case TL_3X3_GRID:
 			case TL_2X2_GRID:
-			 	rcmd = GetTownRoadGridElement(t1, tile, target_dir);
+				rcmd = GetTownRoadGridElement(t1, tile, target_dir);
 				break;
 
 			case TL_BETTER_ROADS:
--- a/src/vehicle.cpp	Fri Apr 18 04:37:06 2008 +0000
+++ b/src/vehicle.cpp	Fri Apr 18 04:54:09 2008 +0000
@@ -2074,7 +2074,7 @@
 			break;
 		}
 
- 		case VLW_GROUP_LIST:
+		case VLW_GROUP_LIST:
 			FOR_ALL_VEHICLES(v) {
 				if (v->type == type && v->IsPrimaryVehicle() &&
 						v->owner == owner && v->group_id == index) {
--- a/src/waypoint.cpp	Fri Apr 18 04:37:06 2008 +0000
+++ b/src/waypoint.cpp	Fri Apr 18 04:54:09 2008 +0000
@@ -100,7 +100,7 @@
 		Waypoint *lwp = GetWaypoint(cid);
 
 		/* check only valid waypoints... */
- 		if (lwp->IsValid() && wp != lwp) {
+		if (lwp->IsValid() && wp != lwp) {
 			/* only waypoints with 'generic' name within the same city */
 			if (lwp->name == NULL && lwp->town_index == wp->town_index) {
 				/* if lwp->town_cn < next, uint will overflow to '+inf' */
--- a/src/win32.cpp	Fri Apr 18 04:37:06 2008 +0000
+++ b/src/win32.cpp	Fri Apr 18 04:54:09 2008 +0000
@@ -1021,7 +1021,7 @@
 char *getcwd(char *buf, size_t size)
 {
 #if defined(WINCE)
- 	TCHAR path[MAX_PATH];
+	TCHAR path[MAX_PATH];
 	GetModuleFileName(NULL, path, MAX_PATH);
 	convert_from_fs(path, buf, size);
 	/* GetModuleFileName returns dir with file, so remove everything behind latest '\\' */