(svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check

This commit is contained in:
smatz
2009-06-06 16:54:22 +00:00
parent c90819ff6d
commit 0c10006907
36 changed files with 185 additions and 161 deletions

View File

@@ -762,7 +762,7 @@ static RoadVehicle *RoadVehFindCloseTo(RoadVehicle *v, int x, int y, Direction d
if (++front->blocked_ctr > 1480) return NULL;
return (RoadVehicle *)rvf.best;
return RoadVehicle::From(rvf.best);
}
static void RoadVehArrivesAt(const RoadVehicle *v, Station *st)