From d8130925f1e624f17a83a0bd52c9f757ca627189 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 1 Jun 1999 21:17:36 +0000 Subject: [PATCH] Fixed some IRIX compile warnings and errors. --- Simulator/FDM/JSBsim/FGAircraft.cpp | 17 +++++++++-------- Simulator/FDM/JSBsim/FGFCS.h | 2 +- Simulator/FDM/JSBsim/FGFDMExec.h | 4 ++-- Simulator/FDM/JSBsim/FGUtility.h | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Simulator/FDM/JSBsim/FGAircraft.cpp b/Simulator/FDM/JSBsim/FGAircraft.cpp index a54e32712..2f58ea87b 100644 --- a/Simulator/FDM/JSBsim/FGAircraft.cpp +++ b/Simulator/FDM/JSBsim/FGAircraft.cpp @@ -201,8 +201,8 @@ bool FGAircraft::LoadAircraftEx(string aircraft_path, string engine_path, string while (!aircraftfile.fail()) { holding_string.erase(); aircraftfile >> holding_string; - if (holding_string.compare("//",0,2) != 0) { -// if (holding_string.compare(0, 2, "//") != 0) { + // if (holding_string.compare("//",0,2) != 0) { + if ( !(holding_string.substr(0, 2) == "//") ) { if (holding_string == "AIRCRAFT") { cout << "Reading in Aircraft parameters ..." << endl; @@ -273,7 +273,7 @@ bool FGAircraft::LoadAircraftEx(string aircraft_path, string engine_path, string aircraftfile >> tag; streampos gpos = aircraftfile.tellg(); aircraftfile >> tag; - if (tag != "}" ) { + if ( !(tag == "}") ) { aircraftfile.seekg(gpos); Coeff[LiftCoeff][coeff_ctr[LiftCoeff]] = new FGCoefficient(FDMExec, aircraftfile); coeff_ctr[LiftCoeff]++; @@ -287,7 +287,7 @@ bool FGAircraft::LoadAircraftEx(string aircraft_path, string engine_path, string aircraftfile >> tag; streampos gpos = aircraftfile.tellg(); aircraftfile >> tag; - if (tag != "}" ) { + if ( !(tag == "}") ) { aircraftfile.seekg(gpos); Coeff[DragCoeff][coeff_ctr[DragCoeff]] = new FGCoefficient(FDMExec, aircraftfile); coeff_ctr[DragCoeff]++; @@ -301,7 +301,7 @@ bool FGAircraft::LoadAircraftEx(string aircraft_path, string engine_path, string aircraftfile >> tag; streampos gpos = aircraftfile.tellg(); aircraftfile >> tag; - if (tag != "}" ) { + if ( !(tag == "}") ) { aircraftfile.seekg(gpos); Coeff[SideCoeff][coeff_ctr[SideCoeff]] = new FGCoefficient(FDMExec, aircraftfile); coeff_ctr[SideCoeff]++; @@ -315,7 +315,7 @@ bool FGAircraft::LoadAircraftEx(string aircraft_path, string engine_path, string aircraftfile >> tag; streampos gpos = aircraftfile.tellg(); aircraftfile >> tag; - if (tag != "}" ) { + if ( !(tag == "}") ) { aircraftfile.seekg(gpos); Coeff[RollCoeff][coeff_ctr[RollCoeff]] = new FGCoefficient(FDMExec, aircraftfile); coeff_ctr[RollCoeff]++; @@ -329,7 +329,7 @@ bool FGAircraft::LoadAircraftEx(string aircraft_path, string engine_path, string aircraftfile >> tag; streampos gpos = aircraftfile.tellg(); aircraftfile >> tag; - if (tag != "}" ) { + if ( !(tag == "}") ) { aircraftfile.seekg(gpos); Coeff[PitchCoeff][coeff_ctr[PitchCoeff]] = new FGCoefficient(FDMExec, aircraftfile); coeff_ctr[PitchCoeff]++; @@ -343,7 +343,7 @@ bool FGAircraft::LoadAircraftEx(string aircraft_path, string engine_path, string aircraftfile >> tag; streampos gpos = aircraftfile.tellg(); aircraftfile >> tag; - if (tag != "}" ) { + if ( !(tag == "}") ) { aircraftfile.seekg(gpos); Coeff[YawCoeff][coeff_ctr[YawCoeff]] = new FGCoefficient(FDMExec, aircraftfile); coeff_ctr[YawCoeff]++; @@ -359,6 +359,7 @@ bool FGAircraft::LoadAircraftEx(string aircraft_path, string engine_path, string } } cout << "End of Configuration File Parsing." << endl; + return true; } diff --git a/Simulator/FDM/JSBsim/FGFCS.h b/Simulator/FDM/JSBsim/FGFCS.h index 026dcc50b..285b4d28b 100644 --- a/Simulator/FDM/JSBsim/FGFCS.h +++ b/Simulator/FDM/JSBsim/FGFCS.h @@ -76,4 +76,4 @@ private: }; /******************************************************************************/ -#endif \ No newline at end of file +#endif diff --git a/Simulator/FDM/JSBsim/FGFDMExec.h b/Simulator/FDM/JSBsim/FGFDMExec.h index 98acb5c43..8e6bdbfc0 100644 --- a/Simulator/FDM/JSBsim/FGFDMExec.h +++ b/Simulator/FDM/JSBsim/FGFDMExec.h @@ -59,8 +59,8 @@ class FGOutput; class FGFDMExec { public: - FGFDMExec::FGFDMExec(void); - FGFDMExec::~FGFDMExec(void); + FGFDMExec(void); + ~FGFDMExec(void); FGModel* FirstModel; diff --git a/Simulator/FDM/JSBsim/FGUtility.h b/Simulator/FDM/JSBsim/FGUtility.h index 142e33d3f..18cb3eaf1 100644 --- a/Simulator/FDM/JSBsim/FGUtility.h +++ b/Simulator/FDM/JSBsim/FGUtility.h @@ -42,7 +42,7 @@ INCLUDES DEFINES *******************************************************************************/ -using namespace std; +// FG_USING_STD(std); /******************************************************************************* CLASS DECLARATION -- 2.39.5