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("<");
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();
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();
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();
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();
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
{
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)
void ParseFile :: storeCommands(string inputLine)
{
- int pos;
- int pos1;
+ string::size_type pos;
+ string::size_type pos1;
// int wordlength;
string line;
= 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 ) {
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);
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 );
#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;
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;
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 {
}
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 );