]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scripting/nasal-props.cxx
Remove osg dependency for isNaN only.
[flightgear.git] / src / Scripting / nasal-props.cxx
index 07aeed43a543e27a83311056dcceacb3718858c2..6112144f2af2c0b4e4495942deb21261c24ccefe 100644 (file)
@@ -185,7 +185,7 @@ static naRef f_getValue(naContext c, naRef me, int argc, naRef* args)
     case props::DOUBLE:
     {
         double dv = (*node)->getDoubleValue();
-        if (osg::isNaN(dv)) {
+        if (SGMisc<double>::isNaN(dv)) {
           SG_LOG(SG_NASAL, SG_ALERT, "Nasal getValue: property " << (*node)->getPath() << " is NaN");
           return naNil();
         }
@@ -242,7 +242,7 @@ static naRef f_setValue(naContext c, naRef me, int argc, naRef* args)
             naRuntimeError(c, "props.setValue() with non-number");
 
         double d = naNumValue(val).num;
-        if (osg::isNaN(d)) {
+        if (SGMisc<double>::isNaN(d)) {
           naRuntimeError(c, "props.setValue() passed a NaN");
         }
 
@@ -282,7 +282,7 @@ static naRef f_setDoubleValue(naContext c, naRef me, int argc, naRef* args)
     if (naIsNil(r))
         naRuntimeError(c, "props.setDoubleValue() with non-number");
 
-    if (osg::isNaN(r.num)) {
+    if (SGMisc<double>::isNaN(r.num)) {
       naRuntimeError(c, "props.setDoubleValue() passed a NaN");
     }
 
@@ -434,7 +434,7 @@ static naRef f_removeChildren(naContext c, naRef me, int argc, naRef* args)
     if(naIsNil(argv) || naVec_size(argv) == 0) {
         // Remove all children
         for(int i = (*node)->nChildren() - 1; i >=0; i--)
-            naVec_append(result, propNodeGhostCreate(c, (*node)->removeChild(i)));
+            naVec_append(result, propNodeGhostCreate(c, (*node)->removeChild(i, false)));
     } else {
         // Remove all children of a specified name
         naRef name = naVec_get(argv, 0);