Fixes for IA-64 with Intel compiler.
This commit is contained in:
parent
dee32ef826
commit
a28b35f3f2
5 changed files with 18 additions and 17 deletions
|
@ -124,7 +124,7 @@ string FGConfigFile::GetNextConfigLine(void)
|
||||||
|
|
||||||
string FGConfigFile::GetValue(string val)
|
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
|
if (val == "") { // this call is to return the tag value
|
||||||
pos = CurrentLine.find("<");
|
pos = CurrentLine.find("<");
|
||||||
|
@ -229,7 +229,7 @@ string FGConfigFile::GetLine(void)
|
||||||
|
|
||||||
FGConfigFile& FGConfigFile::operator>>(double& val)
|
FGConfigFile& FGConfigFile::operator>>(double& val)
|
||||||
{
|
{
|
||||||
unsigned int pos, end;
|
string::size_type pos, end;
|
||||||
|
|
||||||
pos = CurrentLine.find_first_not_of(", ",CurrentIndex);
|
pos = CurrentLine.find_first_not_of(", ",CurrentIndex);
|
||||||
if (pos == CurrentLine.npos) pos = CurrentLine.length();
|
if (pos == CurrentLine.npos) pos = CurrentLine.length();
|
||||||
|
@ -251,7 +251,7 @@ FGConfigFile& FGConfigFile::operator>>(double& val)
|
||||||
|
|
||||||
FGConfigFile& FGConfigFile::operator>>(int& val)
|
FGConfigFile& FGConfigFile::operator>>(int& val)
|
||||||
{
|
{
|
||||||
unsigned int pos, end;
|
string::size_type pos, end;
|
||||||
|
|
||||||
pos = CurrentLine.find_first_not_of(", ",CurrentIndex);
|
pos = CurrentLine.find_first_not_of(", ",CurrentIndex);
|
||||||
if (pos == CurrentLine.npos) pos = CurrentLine.length();
|
if (pos == CurrentLine.npos) pos = CurrentLine.length();
|
||||||
|
@ -273,7 +273,7 @@ FGConfigFile& FGConfigFile::operator>>(int& val)
|
||||||
|
|
||||||
FGConfigFile& FGConfigFile::operator>>(eParam& val)
|
FGConfigFile& FGConfigFile::operator>>(eParam& val)
|
||||||
{
|
{
|
||||||
unsigned int pos, end;
|
string::size_type pos, end;
|
||||||
|
|
||||||
pos = CurrentLine.find_first_not_of(", ",CurrentIndex);
|
pos = CurrentLine.find_first_not_of(", ",CurrentIndex);
|
||||||
if (pos == CurrentLine.npos) pos = CurrentLine.length();
|
if (pos == CurrentLine.npos) pos = CurrentLine.length();
|
||||||
|
@ -295,7 +295,7 @@ FGConfigFile& FGConfigFile::operator>>(eParam& val)
|
||||||
|
|
||||||
FGConfigFile& FGConfigFile::operator>>(string& str)
|
FGConfigFile& FGConfigFile::operator>>(string& str)
|
||||||
{
|
{
|
||||||
unsigned int pos, end;
|
string::size_type pos, end;
|
||||||
|
|
||||||
pos = CurrentLine.find_first_not_of(", ",CurrentIndex);
|
pos = CurrentLine.find_first_not_of(", ",CurrentIndex);
|
||||||
if (pos == CurrentLine.npos) pos = CurrentLine.length();
|
if (pos == CurrentLine.npos) pos = CurrentLine.length();
|
||||||
|
|
|
@ -80,7 +80,7 @@ ParseFile :: ~ParseFile ()
|
||||||
|
|
||||||
void ParseFile :: removeComments(string& inputLine)
|
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
|
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)
|
string ParseFile :: getToken(string inputLine, int tokenNo)
|
||||||
{
|
{
|
||||||
int pos = 0;
|
string::size_type pos = 0;
|
||||||
int pos1 = 0;
|
string::size_type pos1 = 0;
|
||||||
int tokencounter = 0;
|
int tokencounter = 0;
|
||||||
|
|
||||||
while (tokencounter < tokenNo)
|
while (tokencounter < tokenNo)
|
||||||
|
@ -118,8 +118,8 @@ string ParseFile :: getToken(string inputLine, int tokenNo)
|
||||||
|
|
||||||
void ParseFile :: storeCommands(string inputLine)
|
void ParseFile :: storeCommands(string inputLine)
|
||||||
{
|
{
|
||||||
int pos;
|
string::size_type pos;
|
||||||
int pos1;
|
string::size_type pos1;
|
||||||
// int wordlength;
|
// int wordlength;
|
||||||
string line;
|
string line;
|
||||||
|
|
||||||
|
|
|
@ -1095,7 +1095,8 @@ void fgReInitSubsystems( void )
|
||||||
= fgGetNode("/sim/freeze/master");
|
= fgGetNode("/sim/freeze/master");
|
||||||
|
|
||||||
SG_LOG( SG_GENERAL, SG_INFO,
|
SG_LOG( SG_GENERAL, SG_INFO,
|
||||||
"/position/altitude = " << altitude->getDoubleValue() );
|
"fgReInitSubsystems(): /position/altitude = "
|
||||||
|
<< altitude->getDoubleValue() );
|
||||||
|
|
||||||
bool freeze = master_freeze->getBoolValue();
|
bool freeze = master_freeze->getBoolValue();
|
||||||
if ( !freeze ) {
|
if ( !freeze ) {
|
||||||
|
|
|
@ -203,7 +203,7 @@ static bool
|
||||||
parse_wind (const string &wind, double * min_hdg, double * max_hdg,
|
parse_wind (const string &wind, double * min_hdg, double * max_hdg,
|
||||||
double * speed, double * gust)
|
double * speed, double * gust)
|
||||||
{
|
{
|
||||||
unsigned int pos = wind.find('@');
|
string::size_type pos = wind.find('@');
|
||||||
if (pos == string::npos)
|
if (pos == string::npos)
|
||||||
return false;
|
return false;
|
||||||
string dir = wind.substr(0, pos);
|
string dir = wind.substr(0, pos);
|
||||||
|
@ -501,7 +501,7 @@ parse_wp( const string& arg ) {
|
||||||
string id, alt_str;
|
string id, alt_str;
|
||||||
double alt = 0.0;
|
double alt = 0.0;
|
||||||
|
|
||||||
unsigned int pos = arg.find( "@" );
|
string::size_type pos = arg.find( "@" );
|
||||||
if ( pos != string::npos ) {
|
if ( pos != string::npos ) {
|
||||||
id = arg.substr( 0, pos );
|
id = arg.substr( 0, pos );
|
||||||
alt_str = arg.substr( pos + 1 );
|
alt_str = arg.substr( pos + 1 );
|
||||||
|
@ -867,7 +867,7 @@ parse_option (const string& arg)
|
||||||
#endif
|
#endif
|
||||||
} else if ( arg.find( "--prop:" ) == 0 ) {
|
} else if ( arg.find( "--prop:" ) == 0 ) {
|
||||||
string assign = arg.substr(7);
|
string assign = arg.substr(7);
|
||||||
unsigned int pos = assign.find('=');
|
string::size_type pos = assign.find('=');
|
||||||
if ( pos == arg.npos || pos == 0 ) {
|
if ( pos == arg.npos || pos == 0 ) {
|
||||||
SG_LOG( SG_GENERAL, SG_ALERT, "Bad property assignment: " << arg );
|
SG_LOG( SG_GENERAL, SG_ALERT, "Bad property assignment: " << arg );
|
||||||
return FG_OPTIONS_ERROR;
|
return FG_OPTIONS_ERROR;
|
||||||
|
@ -927,7 +927,7 @@ parse_option (const string& arg)
|
||||||
fgSetDouble("/environment/params/gust-wind-speed-kt", gust);
|
fgSetDouble("/environment/params/gust-wind-speed-kt", gust);
|
||||||
|
|
||||||
string val = arg.substr(7);
|
string val = arg.substr(7);
|
||||||
unsigned int pos = val.find('@');
|
string::size_type pos = val.find('@');
|
||||||
if ( pos == string::npos ) {
|
if ( pos == string::npos ) {
|
||||||
SG_LOG( SG_GENERAL, SG_ALERT, "bad wind value " << val );
|
SG_LOG( SG_GENERAL, SG_ALERT, "bad wind value " << val );
|
||||||
return FG_OPTIONS_ERROR;
|
return FG_OPTIONS_ERROR;
|
||||||
|
|
|
@ -97,7 +97,7 @@ void HttpdChannel::foundTerminator (void) {
|
||||||
string request;
|
string request;
|
||||||
string tmp;
|
string tmp;
|
||||||
|
|
||||||
unsigned int pos = rest.find( " " );
|
string::size_type pos = rest.find( " " );
|
||||||
if ( pos != string::npos ) {
|
if ( pos != string::npos ) {
|
||||||
request = rest.substr( 0, pos );
|
request = rest.substr( 0, pos );
|
||||||
} else {
|
} else {
|
||||||
|
@ -127,7 +127,7 @@ void HttpdChannel::foundTerminator (void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
printf(" arg = %s\n", arg.c_str() );
|
printf(" arg = %s\n", arg.c_str() );
|
||||||
unsigned int apos = arg.find("=");
|
string::size_type apos = arg.find("=");
|
||||||
if ( apos != string::npos ) {
|
if ( apos != string::npos ) {
|
||||||
string a = arg.substr( 0, apos );
|
string a = arg.substr( 0, apos );
|
||||||
string b = arg.substr( apos + 1 );
|
string b = arg.substr( apos + 1 );
|
||||||
|
|
Loading…
Add table
Reference in a new issue