1
0
Fork 0

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:
durk 2006-11-25 07:52:08 +00:00
parent 6ad85fbae9
commit 3bd32f75e4
2 changed files with 20 additions and 22 deletions

View file

@ -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");
}
current = i;
closest = current;
//closest = current;
previousInstruction = current->getSpeedAdjustment();
double mindist = HUGE;
if (activeTraffic.size())
@ -775,7 +775,7 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
lat,
alt);
//TrafficVector iterator closest;
//closest = current;
closest = current;
for (TrafficVectorIterator i = activeTraffic.begin();
i != activeTraffic.end(); i++)
{
@ -804,7 +804,7 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
for (TrafficVectorIterator i = towerController->getActiveTraffic().begin();
i != towerController->getActiveTraffic().end(); i++)
{
if (i != current) {
//cerr << "Comparing " << current->getId() << " and " << i->getId() << endl;
//SGWayPoint curr (lon,
// lat,
// alt);
@ -824,7 +824,6 @@ void FGGroundNetwork::checkSpeedAdjustment(int id, double lat,
}
}
}
}
// Finally, check UserPosition
double userLatitude = fgGetDouble("/position/latitude-deg");
double userLongitude = fgGetDouble("/position/longitude-deg");

View file

@ -173,7 +173,6 @@ public:
string getRunway() { return runway; };
void setCallSign(string clsgn) { callsign = clsgn; };
string getCallSign() { return callsign; };
};
typedef vector<FGTrafficRecord> TrafficVector;