summaryrefslogtreecommitdiff
path: root/aircraft_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-13 13:43:55 +0000
committertron <tron@openttd.org>2005-11-13 13:43:55 +0000
commitee15e3de13643b2d09abcc5424bf8e2d916cff75 (patch)
tree385ce09aff7cf19e072a627e83e91fe8a5f3fb3b /aircraft_cmd.c
parent59e885c2bff5b1af6d7f5473106e9aa1f562abfd (diff)
downloadopenttd-ee15e3de13643b2d09abcc5424bf8e2d916cff75.tar.xz
(svn r3172) static, const
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r--aircraft_cmd.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index 4dc24106f..13032b0a3 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -544,7 +544,7 @@ void HandleClickOnAircraft(Vehicle *v)
static void CheckIfAircraftNeedsService(Vehicle *v)
{
- Station *st;
+ const Station* st;
if (_patches.servint_aircraft == 0)
return;
@@ -1269,7 +1269,7 @@ static void AircraftEntersTerminal(Vehicle *v)
static bool ValidateAircraftInHangar( uint data_a, uint data_b )
{
- Vehicle *v = GetVehicle(data_a);
+ const Vehicle* v = GetVehicle(data_a);
return (IsAircraftHangarTile(v->tile) && (v->vehstatus & VS_STOPPED));
}
@@ -1324,7 +1324,7 @@ static void AircraftLandAirplane(Vehicle *v)
// set the right pos when heading to other airports after takeoff
static void AircraftNextAirportPos_and_Order(Vehicle *v)
{
- Station *st;
+ const Station* st;
const AirportFTAClass *Airport;
if (v->current_order.type == OT_GOTO_STATION ||
@@ -1634,7 +1634,7 @@ static AircraftStateHandler * const _aircraft_state_handlers[] = {
AircraftEventHandler_HeliEndLanding,// HELIENDLANDING = 18
};
-static void AirportClearBlock(Vehicle *v, const AirportFTAClass *Airport)
+static void AirportClearBlock(const Vehicle* v, const AirportFTAClass* Airport)
{
Station *st;
// we have left the previous block, and entered the new one. Free the previous block
@@ -1706,16 +1706,14 @@ static bool AirportMove(Vehicle *v, const AirportFTAClass *Airport)
// returns true if the road ahead is busy, eg. you must wait before proceeding
static bool AirportHasBlock(Vehicle *v, AirportFTA *current_pos, const AirportFTAClass *Airport)
{
- Station *st;
- uint32 airport_flags;
- AirportFTA *next, *reference;
- reference = &Airport->layout[v->u.air.pos];
- next = &Airport->layout[current_pos->next_position];
+ const AirportFTA* reference = &Airport->layout[v->u.air.pos];
+ const AirportFTA* next = &Airport->layout[current_pos->next_position];
// same block, then of course we can move
if (Airport->layout[current_pos->position].block != next->block) {
- airport_flags = next->block;
- st = GetStation(v->u.air.targetairport);
+ const Station* st = GetStation(v->u.air.targetairport);
+ uint32 airport_flags = next->block;
+
// check additional possible extra blocks
if (current_pos != reference && current_pos->block != NOTHING_block) {
airport_flags |= current_pos->block;