initialized = other.initialized;
}
-FGScheduledFlight::FGScheduledFlight(string cs,
- string fr,
- string depPrt,
- string arrPrt,
+FGScheduledFlight::FGScheduledFlight(const string& cs,
+ const string& fr,
+ const string& depPrt,
+ const string& arrPrt,
int cruiseAlt,
- string deptime,
- string arrtime,
- string rep)
+ const string& deptime,
+ const string& arrtime,
+ const string& rep)
{
callsign = cs;
fltRules = fr;
{
}
-time_t FGScheduledFlight::processTimeString(string theTime)
+time_t FGScheduledFlight::processTimeString(const string& theTime)
{
int weekday;
int timeOffsetInDays;
bool FGScheduledFlight::initializeAirports()
{
//cerr << "Initializing using : " << depId << " " << arrId << endl;
- departurePort = globals->get_airports()->search( depId, departurePort );
- if(departurePort->getId().empty())
+ departurePort = globals->get_airports()->search(depId);
+ if(departurePort == NULL)
{
cerr << "Could not find " << depId << endl;
return false;
}
- arrivalPort = globals->get_airports()->search(arrId, arrivalPort);
- if(arrivalPort->getId().empty())
+ arrivalPort = globals->get_airports()->search(arrId);
+ if(arrivalPort == NULL)
{
cerr << "Could not find " << arrId << endl;
return false;