Removed a potentially illegal cross-container iterator comparison that made
FlightGear crash on mircosoft visual c++ compilers, as reported by Maik Justus.
This commit is contained in:
parent
6ad85fbae9
commit
3bd32f75e4
2 changed files with 20 additions and 22 deletions
|
@ -765,7 +765,7 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT, "AI error: Trying to access non-existing aircraft in FGGroundNetwork::checkSpeedAdjustment");
|
SG_LOG(SG_GENERAL, SG_ALERT, "AI error: Trying to access non-existing aircraft in FGGroundNetwork::checkSpeedAdjustment");
|
||||||
}
|
}
|
||||||
current = i;
|
current = i;
|
||||||
closest = current;
|
//closest = current;
|
||||||
previousInstruction = current->getSpeedAdjustment();
|
previousInstruction = current->getSpeedAdjustment();
|
||||||
double mindist = HUGE;
|
double mindist = HUGE;
|
||||||
if (activeTraffic.size())
|
if (activeTraffic.size())
|
||||||
|
@ -775,7 +775,7 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
|
||||||
lat,
|
lat,
|
||||||
alt);
|
alt);
|
||||||
//TrafficVector iterator closest;
|
//TrafficVector iterator closest;
|
||||||
//closest = current;
|
closest = current;
|
||||||
for (TrafficVectorIterator i = activeTraffic.begin();
|
for (TrafficVectorIterator i = activeTraffic.begin();
|
||||||
i != activeTraffic.end(); i++)
|
i != activeTraffic.end(); i++)
|
||||||
{
|
{
|
||||||
|
@ -804,7 +804,7 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
|
||||||
for (TrafficVectorIterator i = towerController->getActiveTraffic().begin();
|
for (TrafficVectorIterator i = towerController->getActiveTraffic().begin();
|
||||||
i != towerController->getActiveTraffic().end(); i++)
|
i != towerController->getActiveTraffic().end(); i++)
|
||||||
{
|
{
|
||||||
if (i != current) {
|
//cerr << "Comparing " << current->getId() << " and " << i->getId() << endl;
|
||||||
//SGWayPoint curr (lon,
|
//SGWayPoint curr (lon,
|
||||||
// lat,
|
// lat,
|
||||||
// alt);
|
// alt);
|
||||||
|
@ -824,7 +824,6 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Finally, check UserPosition
|
// Finally, check UserPosition
|
||||||
double userLatitude = fgGetDouble("/position/latitude-deg");
|
double userLatitude = fgGetDouble("/position/latitude-deg");
|
||||||
double userLongitude = fgGetDouble("/position/longitude-deg");
|
double userLongitude = fgGetDouble("/position/longitude-deg");
|
||||||
|
|
|
@ -173,7 +173,6 @@ public:
|
||||||
string getRunway() { return runway; };
|
string getRunway() { return runway; };
|
||||||
void setCallSign(string clsgn) { callsign = clsgn; };
|
void setCallSign(string clsgn) { callsign = clsgn; };
|
||||||
string getCallSign() { return callsign; };
|
string getCallSign() { return callsign; };
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef vector<FGTrafficRecord> TrafficVector;
|
typedef vector<FGTrafficRecord> TrafficVector;
|
||||||
|
|
Loading…
Add table
Reference in a new issue