summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-03-19 00:34:38 +0000
committeryexo <yexo@openttd.org>2010-03-19 00:34:38 +0000
commit81ca0e28c4504bbc7828df50b2086bbdb8776dd1 (patch)
treea745925398d5f85f4333d505b89dd959d9038039 /src
parentba8f7449419a02a4e53c82ee54939ab106393ea7 (diff)
downloadopenttd-81ca0e28c4504bbc7828df50b2086bbdb8776dd1.tar.xz
(svn r19462) -Codechange: use the AS_GENERIC macro also for the dummy airport
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_airport.cpp2
-rw-r--r--src/station_base.h1
-rw-r--r--src/table/airport_defaults.h2
3 files changed, 2 insertions, 3 deletions
diff --git a/src/newgrf_airport.cpp b/src/newgrf_airport.cpp
index adf1801b6..f7caf5124 100644
--- a/src/newgrf_airport.cpp
+++ b/src/newgrf_airport.cpp
@@ -23,8 +23,6 @@ static AirportClass _airport_classes[APC_MAX];
AirportOverrideManager _airport_mngr(NEW_AIRPORT_OFFSET, NUM_AIRPORTS, AT_INVALID);
-AirportSpec AirportSpec::dummy = {NULL, NULL, 0, NULL, 0, 0, 0, 0, 0, MIN_YEAR, MIN_YEAR, STR_NULL, ATP_TTDP_LARGE, APC_BEGIN, false, {AT_INVALID, 0, NULL, NULL, AT_INVALID}};
-
AirportSpec AirportSpec::specs[NUM_AIRPORTS];
/**
diff --git a/src/station_base.h b/src/station_base.h
index bee8c6986..adb58cc89 100644
--- a/src/station_base.h
+++ b/src/station_base.h
@@ -60,7 +60,6 @@ struct Airport : public TileArea {
const AirportFTAClass *GetFTA() const
{
- if (this->tile == INVALID_TILE) return GetAirport(AT_DUMMY);
return this->GetSpec()->fsm;
}
};
diff --git a/src/table/airport_defaults.h b/src/table/airport_defaults.h
index 0ff1bb3a3..63e5ddb50 100644
--- a/src/table/airport_defaults.h
+++ b/src/table/airport_defaults.h
@@ -406,6 +406,8 @@ extern const AirportSpec _origin_airport_specs[] = {
assert_compile(NEW_AIRPORT_OFFSET == lengthof(_origin_airport_specs));
+AirportSpec AirportSpec::dummy = AS_GENERIC(&_airportfta_dummy, NULL, 0, NULL, 0, 0, 0, 0, 0, MIN_YEAR, MIN_YEAR, ATP_TTDP_LARGE, APC_BEGIN, STR_NULL, false);
+
#undef AS
#undef AS_ND
#undef AS_GENERIC