ANSI C++ fixes, to allow compilation with g++ 3.x.
This commit is contained in:
parent
96665adcce
commit
73f5eec1b7
4 changed files with 2 additions and 16 deletions
|
@ -668,7 +668,7 @@ void FGNewEngine::Do_Prop_Calcs()
|
||||||
//cout << "RPM = " << RPM << '\n';
|
//cout << "RPM = " << RPM << '\n';
|
||||||
//cout << "angular_velocity_SI = " << angular_velocity_SI << '\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';
|
//cout << "prop HP consumed = " << prop_power_consumed_SI / 745.699 << '\n';
|
||||||
if(angular_velocity_SI == 0)
|
if(angular_velocity_SI == 0)
|
||||||
prop_torque = 0;
|
prop_torque = 0;
|
||||||
|
|
|
@ -225,7 +225,7 @@ void FGTable::Print(void)
|
||||||
}
|
}
|
||||||
cout << endl;
|
cout << endl;
|
||||||
}
|
}
|
||||||
cout.setf(0, ios::floatfield); // reset
|
cout.setf((ios_base::fmtflags)0, ios::floatfield); // reset
|
||||||
}
|
}
|
||||||
|
|
||||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
|
@ -125,9 +125,7 @@ SG_USING_STD(map);
|
||||||
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
|
#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
|
||||||
SG_USING_STD(iostream);
|
SG_USING_STD(iostream);
|
||||||
#endif
|
#endif
|
||||||
#if defined ( macintosh ) || defined ( _MSC_VER )
|
|
||||||
SG_USING_STD(ofstream);
|
SG_USING_STD(ofstream);
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
typedef stack :: iterator LIST;
|
typedef stack :: iterator LIST;
|
||||||
|
|
|
@ -381,11 +381,7 @@ ssgBranch *fgAsciiObjLoad( const string& path, FGTileEntry *t,
|
||||||
while ( ! in.eof() ) {
|
while ( ! in.eof() ) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined( macintosh ) || defined( _MSC_VER )
|
|
||||||
in >> ::skipws;
|
in >> ::skipws;
|
||||||
#else
|
|
||||||
in >> skipws;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( in.get( c ) && c == '#' ) {
|
if ( in.get( c ) && c == '#' ) {
|
||||||
// process a comment line
|
// 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
|
// read all subsequent numbers until next thing isn't a number
|
||||||
while ( true ) {
|
while ( true ) {
|
||||||
#if defined( macintosh ) || defined( _MSC_VER )
|
|
||||||
in >> ::skipws;
|
in >> ::skipws;
|
||||||
#else
|
|
||||||
in >> skipws;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
char c;
|
char c;
|
||||||
in.get(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
|
// eat white space before start of while loop so if we are
|
||||||
// done with useful input it is noticed before hand.
|
// done with useful input it is noticed before hand.
|
||||||
#if defined( macintosh ) || defined( _MSC_VER )
|
|
||||||
in >> ::skipws;
|
in >> ::skipws;
|
||||||
#else
|
|
||||||
in >> skipws;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue