]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGCoefficient.cpp
Encapsulate the interpolstion version of FGEnvironment and fix some bugs
[flightgear.git] / src / FDM / JSBSim / FGCoefficient.cpp
index 523d8ff7adf1d328e837b2aafdc003b01eb90a64..66111bc401448f6a9ce0162334710e1b52027f7a 100644 (file)
@@ -52,7 +52,7 @@ INCLUDES
 #include "FGPropertyManager.h"
 
 #ifndef FGFS
-#  if defined(sgi) && !defined(__GNUC__)
+#  if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
 #    include <iomanip.h>
 #  else
 #    include <iomanip>
@@ -61,6 +61,8 @@ INCLUDES
 #  include STL_IOMANIP
 #endif
 
+namespace JSBSim {
+
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_COEFFICIENT;
 
@@ -287,7 +289,7 @@ void FGCoefficient::DisplayCoeffFactors(void)
 
 string FGCoefficient::GetSDstring(void)
 {
-  char buffer[10];
+  char buffer[16];
   string value;
 
   sprintf(buffer,"%9.6f",SD);
@@ -302,7 +304,7 @@ void FGCoefficient::bind(FGPropertyManager *parent)
   string mult;
   unsigned i;
   
-  node=parent->GetNode(name,true);
+  node = parent->GetNode(name,true);
   
   node->SetString("description",description);
   if (LookupR) node->SetString("row-parm",LookupR->getName() );
@@ -341,14 +343,16 @@ void FGCoefficient::unbind(void)
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-FGPropertyManager* FGCoefficient::resolveSymbol(string name){
-        FGPropertyManager* tmpn;
-        tmpn = PropertyManager->GetNode(name,false);
-        if( !tmpn ) {
-          cerr << "Coefficient multipliers cannot create properties, check spelling?" << endl;
-          exit(1);
-        } 
-        return tmpn; 
+FGPropertyManager* FGCoefficient::resolveSymbol(string name)
+{
+  FGPropertyManager* tmpn;
+
+  tmpn = PropertyManager->GetNode(name,false);
+  if ( !tmpn ) {
+    cerr << "Coefficient multipliers cannot create properties, check spelling?" << endl;
+    exit(1);
+  } 
+  return tmpn; 
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -420,3 +424,4 @@ void FGCoefficient::Debug(int from)
   }
 }
 
+} // namespace JSBSim