Changeset - r8607:6002fd061277
[Not reviewed]
master
0 1 0
smatz - 16 years ago 2008-02-20 12:07:22
smatz@openttd.org
(svn r12189) -Codechange: mark some functions in train_cmd.cpp inline (called once or very short)
1 file changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/train_cmd.cpp
Show inline comments
 
@@ -1544,7 +1544,7 @@ static void UpdateVarsAfterSwap(Vehicle 
 
	EndVehicleMove(v);
 
}
 

	
 
static void SetLastSpeed(Vehicle* v, int spd)
 
static inline void SetLastSpeed(Vehicle* v, int spd)
 
{
 
	int old = v->u.rail.last_speed;
 
	if (spd != old) {
 
@@ -2771,7 +2771,7 @@ static const Direction _new_vehicle_dire
 
	DIR_E , DIR_SE, DIR_S
 
};
 

	
 
static Direction GetNewVehicleDirectionByTile(TileIndex new_tile, TileIndex old_tile)
 
static inline Direction GetNewVehicleDirectionByTile(TileIndex new_tile, TileIndex old_tile)
 
{
 
	uint offs = (TileY(new_tile) - TileY(old_tile) + 1) * 4 +
 
							TileX(new_tile) - TileX(old_tile) + 1;
 
@@ -2779,7 +2779,7 @@ static Direction GetNewVehicleDirectionB
 
	return _new_vehicle_direction_table[offs];
 
}
 

	
 
static int GetDirectionToVehicle(const Vehicle *v, int x, int y)
 
static inline int GetDirectionToVehicle(const Vehicle *v, int x, int y)
 
{
 
	byte offs;
 

	
 
@@ -2802,7 +2802,7 @@ static int GetDirectionToVehicle(const V
 
}
 

	
 
/* Check if the vehicle is compatible with the specified tile */
 
static bool CheckCompatibleRail(const Vehicle *v, TileIndex tile)
 
static inline bool CheckCompatibleRail(const Vehicle *v, TileIndex tile)
 
{
 
	return
 
		IsTileOwner(tile, v->owner) && (
 
@@ -2826,7 +2826,7 @@ static const RailtypeSlowdownParams _rai
 
};
 

	
 
/** Modify the speed of the vehicle due to a turn */
 
static void AffectSpeedByDirChange(Vehicle* v, Direction new_dir)
 
static inline void AffectSpeedByDirChange(Vehicle* v, Direction new_dir)
 
{
 
	if (_patches.realistic_acceleration) return;
 

	
 
@@ -2838,7 +2838,7 @@ static void AffectSpeedByDirChange(Vehic
 
}
 

	
 
/** Modify the speed of the vehicle due to a change in altitude */
 
static void AffectSpeedByZChange(Vehicle *v, byte old_z)
 
static inline void AffectSpeedByZChange(Vehicle *v, byte old_z)
 
{
 
	if (old_z == v->z_pos || _patches.realistic_acceleration) return;
 

	
0 comments (0 inline, 0 general)