1
0
Fork 0

Initialize class member in AIFlightPlan

This commit is contained in:
Frederic Bouvier 2011-01-30 21:20:50 +01:00
parent a853af5b0e
commit 6bb8e69b92

View file

@ -49,6 +49,7 @@ using std::cerr;
FGAIFlightPlan::FGAIFlightPlan() FGAIFlightPlan::FGAIFlightPlan()
{ {
sid = 0; sid = 0;
wpt_iterator = waypoints.begin();
} }
FGAIFlightPlan::FGAIFlightPlan(const string& filename) FGAIFlightPlan::FGAIFlightPlan(const string& filename)
@ -176,6 +177,7 @@ FGAIFlightPlan::FGAIFlightPlan(FGAIAircraft *ac,
else wpt->finished = false; else wpt->finished = false;
waypoints.push_back(wpt); waypoints.push_back(wpt);
} // of node loop } // of node loop
wpt_iterator = waypoints.begin();
} catch (const sg_exception &e) { } catch (const sg_exception &e) {
SG_LOG(SG_GENERAL, SG_WARN, "Error reading AI flight plan: " << SG_LOG(SG_GENERAL, SG_WARN, "Error reading AI flight plan: " <<
e.getMessage() << " from " << e.getOrigin()); e.getMessage() << " from " << e.getOrigin());