X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FTraffic%2FSchedFlight.cxx;h=a66915a1e0831069d2772ada688ab00c2560bef9;hb=e48409d13664500d2ae7bb69c4b37c3c79a21cf9;hp=dc44c53b6b2f952a372cf6866b2fbc54389e08d0;hpb=b33d28cf4b57409a8dac69ad58171512a7201e20;p=flightgear.git diff --git a/src/Traffic/SchedFlight.cxx b/src/Traffic/SchedFlight.cxx index dc44c53b6..a66915a1e 100644 --- a/src/Traffic/SchedFlight.cxx +++ b/src/Traffic/SchedFlight.cxx @@ -174,6 +174,7 @@ time_t FGScheduledFlight::processTimeString(const string& theTime) { timeOffsetInDays = 0; } + // TODO: verify status of each token. targetHour = atoi(timeCopy.substr(0,2).c_str()); targetMinute = atoi(timeCopy.substr(3,5).c_str()); targetSecond = atoi(timeCopy.substr(6,8).c_str()); @@ -264,13 +265,13 @@ bool FGScheduledFlight::initializeAirports() departurePort = globals->get_airports()->search(depId); if(departurePort == NULL) { - cerr << "Could not find " << depId << endl; + SG_LOG( SG_GENERAL, SG_WARN, "Traffic manager could not find departure airport : " << depId); return false; } arrivalPort = globals->get_airports()->search(arrId); if(arrivalPort == NULL) { - cerr << "Could not find " << arrId << endl; + SG_LOG( SG_GENERAL, SG_WARN, "Traffic manager could not find arrival airport : " << arrId); return false; } @@ -279,3 +280,9 @@ bool FGScheduledFlight::initializeAirports() initialized = true; return true; } + + +bool compareScheduledFlights(FGScheduledFlight *a, FGScheduledFlight *b) +{ + return (*a) < (*b); +};