]> git.mxchange.org Git - flightgear.git/commitdiff
ANSI C++ fixes, to allow compilation with g++ 3.x.
authordavid <david>
Thu, 10 Jan 2002 12:52:39 +0000 (12:52 +0000)
committerdavid <david>
Thu, 10 Jan 2002 12:52:39 +0000 (12:52 +0000)
src/FDM/IO360.cxx
src/FDM/JSBSim/FGTable.cpp
src/FDM/UIUCModel/uiuc_aircraft.h
src/Objects/obj.cxx

index a9b5540dbaec12812aca2f0ac742b36320b37ce5..84120252db51e8494b895adf07f64fa6b467ba65 100644 (file)
@@ -668,7 +668,7 @@ void FGNewEngine::Do_Prop_Calcs()
     //cout << "RPM = " << RPM << '\n';
     //cout << "angular_velocity_SI = " << angular_velocity_SI << '\n';
     
-    prop_power_consumed_SI = Cp * rho_air * pow(FGProp1_RPS,3.0) * pow(prop_diameter,5.0);
+    prop_power_consumed_SI = Cp * rho_air * pow(FGProp1_RPS,3.0f) * pow(float(prop_diameter),5.0f);
     //cout << "prop HP consumed = " << prop_power_consumed_SI / 745.699 << '\n';
     if(angular_velocity_SI == 0)
         prop_torque = 0;
index 103e7e0f0b594a68c329a0c6b27c790fa9799f9e..48c4877b17c19cb7e7a817bf872abc18e4ab203b 100644 (file)
@@ -225,7 +225,7 @@ void FGTable::Print(void)
     }
     cout << endl;
   }
-  cout.setf(0, ios::floatfield); // reset
+  cout.setf((ios_base::fmtflags)0, ios::floatfield); // reset
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
index 6d407f8a353574076283dbf5e7ed6c80e54aefe2..ff22a2b8dedd78e70d42150b06854961d5784c2f 100644 (file)
@@ -125,9 +125,7 @@ SG_USING_STD(map);
 #if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(iostream);
 #endif
-#if defined ( macintosh ) || defined ( _MSC_VER )
 SG_USING_STD(ofstream);
-#endif
 
 
 typedef stack :: iterator LIST;
index 16611116920f37bb33ea9e543384706b01924869..4fb53463cdad10dd8d44140f64250677406f6e67 100644 (file)
@@ -381,11 +381,7 @@ ssgBranch *fgAsciiObjLoad( const string& path, FGTileEntry *t,
     while ( ! in.eof() ) {
 #endif
 
-#if defined( macintosh ) || defined( _MSC_VER )
        in >> ::skipws;
-#else
-       in >> skipws;
-#endif
 
        if ( in.get( c ) && c == '#' ) {
            // process a comment line
@@ -628,11 +624,7 @@ ssgBranch *fgAsciiObjLoad( const string& path, FGTileEntry *t,
                
                // read all subsequent numbers until next thing isn't a number
                while ( true ) {
-#if defined( macintosh ) || defined( _MSC_VER )
                    in >> ::skipws;
-#else
-                   in >> skipws;
-#endif
 
                    char c;
                    in.get(c);
@@ -740,11 +732,7 @@ ssgBranch *fgAsciiObjLoad( const string& path, FGTileEntry *t,
 
            // eat white space before start of while loop so if we are
            // done with useful input it is noticed before hand.
-#if defined( macintosh ) || defined( _MSC_VER )
            in >> ::skipws;
-#else
-           in >> skipws;
-#endif
        }
     }