}
//------------------------------------------------------------------------------
-static naRef f_navaid_course(naContext, FGNavRecord& nav)
+static naRef f_navaid_course(FGNavRecord& nav, naContext)
{
if( !( nav.type() == FGPositioned::ILS
|| nav.type() == FGPositioned::LOC
}
//------------------------------------------------------------------------------
-FGRunway* runwayFromNasalArg( const FGAirport& apt,
+FGRunwayRef runwayFromNasalArg( const FGAirport& apt,
const nasal::CallContext& ctx,
size_t index = 0 )
{
if( index >= ctx.argc )
- return NULL;
+ return FGRunwayRef();
try
{
{
if( !apt.hasRunwayWithIdent(ident) )
// TODO warning/exception?
- return NULL;
+ return FGRunwayRef();
return apt.getRunwayByIdent(ident);
}
{}
// TODO warn/error if no runway?
- return NasalRunway::fromNasal(ctx.c, ctx.args[index]);
+ return ctx.from_nasal<FGRunwayRef>(ctx.args[index]);
}
//------------------------------------------------------------------------------
if( ctx.isGhost(0) )
{
- FGPositioned* pos =
- NasalPositioned::fromNasal(ctx.c, ctx.requireArg<naRef>(0));
+ FGPositionedRef pos =
+ ctx.from_nasal<FGPositionedRef>(ctx.requireArg<naRef>(0));
if( pos )
{