From a28b35f3f2a48187965f6063806cbc52e1d26bc9 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 2 Jul 2002 20:45:02 +0000 Subject: [PATCH] Fixes for IA-64 with Intel compiler. --- src/FDM/JSBSim/FGConfigFile.cpp | 10 +++++----- src/FDM/UIUCModel/uiuc_parsefile.cpp | 10 +++++----- src/Main/fg_init.cxx | 3 ++- src/Main/options.cxx | 8 ++++---- src/Network/httpd.cxx | 4 ++-- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/FDM/JSBSim/FGConfigFile.cpp b/src/FDM/JSBSim/FGConfigFile.cpp index 9a03a1517..77d0628de 100644 --- a/src/FDM/JSBSim/FGConfigFile.cpp +++ b/src/FDM/JSBSim/FGConfigFile.cpp @@ -124,7 +124,7 @@ string FGConfigFile::GetNextConfigLine(void) string FGConfigFile::GetValue(string val) { - unsigned int pos, p1, p2, ptest; + string::size_type pos, p1, p2, ptest; if (val == "") { // this call is to return the tag value pos = CurrentLine.find("<"); @@ -229,7 +229,7 @@ string FGConfigFile::GetLine(void) FGConfigFile& FGConfigFile::operator>>(double& val) { - unsigned int pos, end; + string::size_type pos, end; pos = CurrentLine.find_first_not_of(", ",CurrentIndex); if (pos == CurrentLine.npos) pos = CurrentLine.length(); @@ -251,7 +251,7 @@ FGConfigFile& FGConfigFile::operator>>(double& val) FGConfigFile& FGConfigFile::operator>>(int& val) { - unsigned int pos, end; + string::size_type pos, end; pos = CurrentLine.find_first_not_of(", ",CurrentIndex); if (pos == CurrentLine.npos) pos = CurrentLine.length(); @@ -273,7 +273,7 @@ FGConfigFile& FGConfigFile::operator>>(int& val) FGConfigFile& FGConfigFile::operator>>(eParam& val) { - unsigned int pos, end; + string::size_type pos, end; pos = CurrentLine.find_first_not_of(", ",CurrentIndex); if (pos == CurrentLine.npos) pos = CurrentLine.length(); @@ -295,7 +295,7 @@ FGConfigFile& FGConfigFile::operator>>(eParam& val) FGConfigFile& FGConfigFile::operator>>(string& str) { - unsigned int pos, end; + string::size_type pos, end; pos = CurrentLine.find_first_not_of(", ",CurrentIndex); if (pos == CurrentLine.npos) pos = CurrentLine.length(); diff --git a/src/FDM/UIUCModel/uiuc_parsefile.cpp b/src/FDM/UIUCModel/uiuc_parsefile.cpp index d74caa281..efc6a16e4 100644 --- a/src/FDM/UIUCModel/uiuc_parsefile.cpp +++ b/src/FDM/UIUCModel/uiuc_parsefile.cpp @@ -80,7 +80,7 @@ ParseFile :: ~ParseFile () void ParseFile :: removeComments(string& inputLine) { - int pos = inputLine.find_first_of(COMMENT); + string::size_type pos = inputLine.find_first_of(COMMENT); if (pos != inputLine.npos) // a "#" exists in the line { @@ -94,8 +94,8 @@ void ParseFile :: removeComments(string& inputLine) string ParseFile :: getToken(string inputLine, int tokenNo) { - int pos = 0; - int pos1 = 0; + string::size_type pos = 0; + string::size_type pos1 = 0; int tokencounter = 0; while (tokencounter < tokenNo) @@ -118,8 +118,8 @@ string ParseFile :: getToken(string inputLine, int tokenNo) void ParseFile :: storeCommands(string inputLine) { - int pos; - int pos1; + string::size_type pos; + string::size_type pos1; // int wordlength; string line; diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index dae961c61..50871d7e8 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -1095,7 +1095,8 @@ void fgReInitSubsystems( void ) = fgGetNode("/sim/freeze/master"); SG_LOG( SG_GENERAL, SG_INFO, - "/position/altitude = " << altitude->getDoubleValue() ); + "fgReInitSubsystems(): /position/altitude = " + << altitude->getDoubleValue() ); bool freeze = master_freeze->getBoolValue(); if ( !freeze ) { diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 846169b5f..d6cb5dd3f 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -203,7 +203,7 @@ static bool parse_wind (const string &wind, double * min_hdg, double * max_hdg, double * speed, double * gust) { - unsigned int pos = wind.find('@'); + string::size_type pos = wind.find('@'); if (pos == string::npos) return false; string dir = wind.substr(0, pos); @@ -501,7 +501,7 @@ parse_wp( const string& arg ) { string id, alt_str; double alt = 0.0; - unsigned int pos = arg.find( "@" ); + string::size_type pos = arg.find( "@" ); if ( pos != string::npos ) { id = arg.substr( 0, pos ); alt_str = arg.substr( pos + 1 ); @@ -867,7 +867,7 @@ parse_option (const string& arg) #endif } else if ( arg.find( "--prop:" ) == 0 ) { string assign = arg.substr(7); - unsigned int pos = assign.find('='); + string::size_type pos = assign.find('='); if ( pos == arg.npos || pos == 0 ) { SG_LOG( SG_GENERAL, SG_ALERT, "Bad property assignment: " << arg ); return FG_OPTIONS_ERROR; @@ -927,7 +927,7 @@ parse_option (const string& arg) fgSetDouble("/environment/params/gust-wind-speed-kt", gust); string val = arg.substr(7); - unsigned int pos = val.find('@'); + string::size_type pos = val.find('@'); if ( pos == string::npos ) { SG_LOG( SG_GENERAL, SG_ALERT, "bad wind value " << val ); return FG_OPTIONS_ERROR; diff --git a/src/Network/httpd.cxx b/src/Network/httpd.cxx index da2a5fd87..97ab9b5d4 100644 --- a/src/Network/httpd.cxx +++ b/src/Network/httpd.cxx @@ -97,7 +97,7 @@ void HttpdChannel::foundTerminator (void) { string request; string tmp; - unsigned int pos = rest.find( " " ); + string::size_type pos = rest.find( " " ); if ( pos != string::npos ) { request = rest.substr( 0, pos ); } else { @@ -127,7 +127,7 @@ void HttpdChannel::foundTerminator (void) { } printf(" arg = %s\n", arg.c_str() ); - unsigned int apos = arg.find("="); + string::size_type apos = arg.find("="); if ( apos != string::npos ) { string a = arg.substr( 0, apos ); string b = arg.substr( apos + 1 ); -- 2.39.5