X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FScripting%2FNasalPositioned_cppbind.cxx;h=7ef63d02c5f7aea29c6241d094cb131c87e8e57c;hb=9c63b7713307eb4db9f6df7959fe83977f561c42;hp=9f3a1968cf79c1d6bd87e59257094da3504f9457;hpb=741c3c892cd572d335d0fef73e13d9cd8052bc13;p=flightgear.git diff --git a/src/Scripting/NasalPositioned_cppbind.cxx b/src/Scripting/NasalPositioned_cppbind.cxx index 9f3a1968c..7ef63d02c 100644 --- a/src/Scripting/NasalPositioned_cppbind.cxx +++ b/src/Scripting/NasalPositioned_cppbind.cxx @@ -131,12 +131,12 @@ static naRef f_airport_comms(FGAirport& apt, const nasal::CallContext& ctx) } //------------------------------------------------------------------------------ -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 { @@ -145,7 +145,7 @@ FGRunway* runwayFromNasalArg( const FGAirport& apt, { if( !apt.hasRunwayWithIdent(ident) ) // TODO warning/exception? - return NULL; + return FGRunwayRef(); return apt.getRunwayByIdent(ident); } @@ -154,7 +154,7 @@ FGRunway* runwayFromNasalArg( const FGAirport& apt, {} // TODO warn/error if no runway? - return NasalRunway::fromNasal(ctx.c, ctx.args[index]); + return ctx.from_nasal(ctx.args[index]); } //------------------------------------------------------------------------------ @@ -245,8 +245,8 @@ static bool extractGeod(nasal::CallContext& ctx, SGGeod& result) if( ctx.isGhost(0) ) { - FGPositioned* pos = - NasalPositioned::fromNasal(ctx.c, ctx.requireArg(0)); + FGPositionedRef pos = + ctx.from_nasal(ctx.requireArg(0)); if( pos ) {