using std::string;
-#include "Airports/runways.hxx"
-#include "Airports/simple.hxx"
+#include <Airports/runways.hxx>
+#include <Airports/simple.hxx>
#ifndef _MSC_VER
-# include "Include/version.h"
+# include <Include/version.h>
#endif
-#include "Main/fg_props.hxx"
-#include "Main/globals.hxx"
+#include <Main/fg_props.hxx>
+#include <Main/globals.hxx>
#include "instrument_mgr.hxx"
#include "mk_viii.hxx"
return false;
}
-bool MK_VIII::Mode6Handler::AirportFilter::pass(FGPositioned* a) const
+bool MK_VIII::Mode6Handler::AirportFilter::passAirport(FGAirport* a) const
{
- if (a->type() != FGPositioned::AIRPORT) {
- return false;
- }
-
- bool ok = self->test_airport(static_cast<FGAirport*>(a));
+ bool ok = self->test_airport(a);
return ok;
}
return _runway;
}
-bool MK_VIII::TCFHandler::AirportFilter::pass(FGPositioned* aPos) const
+bool MK_VIII::TCFHandler::AirportFilter::passAirport(FGAirport* aApt) const
{
- if (aPos->type() != FGPositioned::AIRPORT) {
- return false;
- }
-
- FGAirport* apt = static_cast<FGAirport*>(aPos);
- return apt->hasHardRunwayOfLengthFt(mk->conf.runway_database);
+ return aApt->hasHardRunwayOfLengthFt(mk->conf.runway_database);
}
void
// large airports, which may have a runway located far away from
// the airport's reference point.
AirportFilter filter(mk);
- FGPositionedRef apt = FGPositioned::findClosest(
+ FGAirport* apt = FGAirport::findClosest(
SGGeod::fromDeg(mk_data(gps_longitude).get(), mk_data(gps_latitude).get()),
30.0, &filter);
has_runway = true;
- FGRunway* _runway = select_runway(static_cast<FGAirport*>(apt.ptr()));
+ FGRunway* _runway = select_runway(apt);
runway.center.latitude = _runway->latitude();
runway.center.longitude = _runway->longitude();