(svn r18342) -Fix: erroneous spaces before ;

This commit is contained in:
rubidium 2009-11-29 19:20:39 +00:00
parent e2b619392c
commit 8c11679381
8 changed files with 14 additions and 14 deletions

View File

@ -35,7 +35,7 @@ void DrawAircraftDetails(const Aircraft *v, int left, int right, int y)
int y_offset = (v->Next()->cargo_cap != 0) ? -(FONT_HEIGHT_NORMAL + 1): 0;
Money feeder_share = 0;
for (const Aircraft *u = v ; u != NULL ; u = u->Next()) {
for (const Aircraft *u = v; u != NULL; u = u->Next()) {
if (u->IsNormalAircraft()) {
SetDParam(0, u->engine_type);
SetDParam(1, u->build_year);

View File

@ -217,7 +217,7 @@ struct SpecializedStation : public BaseStation {
*/
static FORCEINLINE T *GetIfValid(size_t index)
{
return IsValidID(index) ? Get(index) : NULL ;
return IsValidID(index) ? Get(index) : NULL;
}
/**

View File

@ -62,7 +62,7 @@ struct Company : CompanyPool::PoolItem<&_company_pool> {
uint32 cargo_types; ///< which cargo types were transported the last year
TileIndex location_of_HQ; ///< northern tile of HQ ; INVALID_TILE when there is none
TileIndex location_of_HQ; ///< northern tile of HQ; INVALID_TILE when there is none
TileIndex last_build_coordinate;
OwnerByte share_owners[4];

View File

@ -392,7 +392,7 @@ public:
case GRP_WIDGET_LIST_GROUP: {
int y1 = r.top + WD_FRAMERECT_TOP + 1;
int max = min(this->vscroll2.GetPosition() + this->vscroll2.GetCapacity(), this->groups.Length());
for (int i = this->vscroll2.GetPosition() ; i < max ; ++i) {
for (int i = this->vscroll2.GetPosition(); i < max; ++i) {
const Group *g = this->groups[i];
assert(g->owner == this->owner);

View File

@ -399,7 +399,7 @@ public:
switch (widget) {
case DPIW_MATRIX_WIDGET: {
const IndustrySpec *indsp;
int y = (pt.y - this->GetWidget<NWidgetBase>(DPIW_MATRIX_WIDGET)->pos_y) / this->resize.step_height + this->vscroll.GetPosition() ;
int y = (pt.y - this->GetWidget<NWidgetBase>(DPIW_MATRIX_WIDGET)->pos_y) / this->resize.step_height + this->vscroll.GetPosition();
if (y >= 0 && y < count) { // Is it within the boundaries of available data?
this->selected_index = y;

View File

@ -1108,7 +1108,7 @@ CommandCost CmdBuildRailStation(TileIndex tile_org, DoCommandFlag flags, uint32
FreeTrainTrackReservation(v);
*affected_vehicles.Append() = v;
if (IsRailStationTile(v->tile)) SetRailStationPlatformReservation(v->tile, TrackdirToExitdir(v->GetVehicleTrackdir()), false);
for (; v->Next() != NULL; v = v->Next()) ;
for (; v->Next() != NULL; v = v->Next()) { }
if (IsRailStationTile(v->tile)) SetRailStationPlatformReservation(v->tile, TrackdirToExitdir(ReverseTrackdir(v->GetVehicleTrackdir())), false);
}
}
@ -1148,7 +1148,7 @@ CommandCost CmdBuildRailStation(TileIndex tile_org, DoCommandFlag flags, uint32
Train *v = affected_vehicles[i];
if (IsRailStationTile(v->tile)) SetRailStationPlatformReservation(v->tile, TrackdirToExitdir(v->GetVehicleTrackdir()), true);
TryPathReserve(v, true, true);
for (; v->Next() != NULL; v = v->Next()) ;
for (; v->Next() != NULL; v = v->Next()) { }
if (IsRailStationTile(v->tile)) SetRailStationPlatformReservation(v->tile, TrackdirToExitdir(ReverseTrackdir(v->GetVehicleTrackdir())), true);
}
@ -1269,7 +1269,7 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector<T *, 4> &affected
FreeTrainTrackReservation(v);
if (IsRailStationTile(v->tile)) SetRailStationPlatformReservation(v->tile, TrackdirToExitdir(v->GetVehicleTrackdir()), false);
Vehicle *temp = v;
for (; temp->Next() != NULL; temp = temp->Next()) ;
for (; temp->Next() != NULL; temp = temp->Next()) { }
if (IsRailStationTile(temp->tile)) SetRailStationPlatformReservation(temp->tile, TrackdirToExitdir(ReverseTrackdir(temp->GetVehicleTrackdir())), false);
}
}
@ -1289,7 +1289,7 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector<T *, 4> &affected
/* Restore station reservation. */
if (IsRailStationTile(v->tile)) SetRailStationPlatformReservation(v->tile, TrackdirToExitdir(v->GetVehicleTrackdir()), true);
TryPathReserve(v, true, true);
for (; v->Next() != NULL; v = v->Next()) ;
for (; v->Next() != NULL; v = v->Next()) { }
if (IsRailStationTile(v->tile)) SetRailStationPlatformReservation(v->tile, TrackdirToExitdir(ReverseTrackdir(v->GetVehicleTrackdir())), true);
}
}

View File

@ -200,7 +200,7 @@ int GetTrainDetailsWndVScroll(VehicleID veh_id, TrainDetailsWindowTabs det_tab)
if (det_tab == TDW_TAB_TOTALS) { // Total cargo tab
CargoArray act_cargo;
CargoArray max_cargo;
for (const Vehicle *v = Vehicle::Get(veh_id) ; v != NULL ; v = v->Next()) {
for (const Vehicle *v = Vehicle::Get(veh_id); v != NULL; v = v->Next()) {
act_cargo[v->cargo_type] += v->cargo.Count();
max_cargo[v->cargo_type] += v->cargo_cap;
}
@ -213,7 +213,7 @@ int GetTrainDetailsWndVScroll(VehicleID veh_id, TrainDetailsWindowTabs det_tab)
}
num++; // needs one more because first line is description string
} else {
for (const Train *v = Train::Get(veh_id) ; v != NULL ; v = v->Next()) {
for (const Train *v = Train::Get(veh_id); v != NULL; v = v->Next()) {
if (!v->IsArticulatedPart() || v->cargo_cap != 0) num++;
}
}
@ -291,7 +291,7 @@ void DrawTrainDetails(const Train *v, int left, int right, int y, int vscroll_po
CargoArray max_cargo;
Money feeder_share = 0;
for (const Vehicle *u = v; u != NULL ; u = u->Next()) {
for (const Vehicle *u = v; u != NULL; u = u->Next()) {
act_cargo[u->cargo_type] += u->cargo.Count();
max_cargo[u->cargo_type] += u->cargo_cap;
feeder_share += u->cargo.FeederShare();

View File

@ -639,7 +639,7 @@ struct SpecializedVehicle : public Vehicle {
*/
static FORCEINLINE T *GetIfValid(size_t index)
{
return IsValidID(index) ? Get(index) : NULL ;
return IsValidID(index) ? Get(index) : NULL;
}
/**
@ -690,7 +690,7 @@ struct DisasterVehicle : public SpecializedVehicle<DisasterVehicle, VEH_DISASTER
struct FreeUnitIDGenerator {
bool *cache; ///< array of occupied unit id numbers
UnitID maxid; ///< maximum ID at the moment of constructor call
UnitID curid; ///< last ID returned ; 0 if none
UnitID curid; ///< last ID returned; 0 if none
/** Initializes the structure. Vehicle unit numbers are supposed not to change after
* struct initialization, except after each call to this->NextID() the returned value