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;
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]++;
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]++;
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]++;
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]++;
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]++;
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]++;
}
}
cout << "End of Configuration File Parsing." << endl;
+ return true;
}