]> git.mxchange.org Git - flightgear.git/blobdiff - src/Traffic/SchedFlight.cxx
Add a lower-bound type navaid lookup, and the ability to specify navaid type in the...
[flightgear.git] / src / Traffic / SchedFlight.cxx
index e02f54f879314b46116beae36ff8c7f3b13f3982..a65adad8c0b45fee2a4a2317f0feb1b024b0a321 100644 (file)
@@ -91,14 +91,14 @@ FGScheduledFlight::FGScheduledFlight(const FGScheduledFlight &other)
   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;
@@ -142,7 +142,7 @@ FGScheduledFlight:: ~FGScheduledFlight()
 {
 }
 
-time_t FGScheduledFlight::processTimeString(string theTime)
+time_t FGScheduledFlight::processTimeString(const string& theTime)
 {
   int weekday;
   int timeOffsetInDays;
@@ -257,14 +257,14 @@ FGAirport * FGScheduledFlight::getArrivalAirport  ()
 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;