]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scripting/NasalPositioned_cppbind.cxx
Remove debug console output in FGApproachController
[flightgear.git] / src / Scripting / NasalPositioned_cppbind.cxx
index 9f3a1968cf79c1d6bd87e59257094da3504f9457..7ef63d02c5f7aea29c6241d094cb131c87e8e57c 100644 (file)
@@ -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<FGRunwayRef>(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<naRef>(0));
+    FGPositionedRef pos =
+      ctx.from_nasal<FGPositionedRef>(ctx.requireArg<naRef>(0));
 
     if( pos )
     {