*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
**************************************************************************/
* - Find an alternative for the depricated Point3D class
*
*****************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdlib.h>
#include <time.h>
#include <iostream>
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;
- int targetDate;
int targetHour;
int targetMinute;
int targetSecond;
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;