]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGScript.cpp
Frederic Bouvier:
[flightgear.git] / src / FDM / JSBSim / FGScript.cpp
index 13526278f9d031552dffabcfc5d5d588e3dfee66..7c9ec35ddd6d19507cc26cf6d055852d97bba187 100644 (file)
@@ -46,7 +46,7 @@ INCLUDES
 #  include STL_IOSTREAM
 #  include STL_ITERATOR
 #else
-#  if defined(sgi) && !defined(__GNUC__)
+#  if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
 #    include <iostream.h>
 #  else
 #    include <iostream>
@@ -57,6 +57,8 @@ INCLUDES
 #include "FGScript.h"
 #include "FGConfigFile.h"
 
+namespace JSBSim {
+
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_FGSCRIPT;
 
@@ -143,12 +145,12 @@ bool FGScript::LoadScript( string script )
           newCondition = new struct condition();
           while (token != string("/when")) {
             if (token == "parameter") {
-              prop_name = State->GetPropertyName( Script.GetValue("name") );
+              prop_name = Script.GetValue("name");
               newCondition->TestParam.push_back( PropertyManager->GetNode(prop_name) );
               newCondition->TestValue.push_back(strtod(Script.GetValue("value").c_str(), NULL));
               newCondition->Comparison.push_back(Script.GetValue("comparison"));
             } else if (token == "set") {
-              prop_name = State->GetPropertyName( Script.GetValue("name") );
+              prop_name = Script.GetValue("name");
               newCondition->SetParam.push_back( PropertyManager->GetNode(prop_name) );
               newCondition->SetValue.push_back(strtod(Script.GetValue("value").c_str(), NULL));
               newCondition->Triggered.push_back(false);
@@ -415,4 +417,4 @@ void FGScript::Debug(int from)
     }
   }
 }
-
+}