Olaf Flebbe:
The prototype of update_metar_properties does not match overridden func. trafficmgr: iterators below begin() and after end(). tower.cxx : iterator incrementing beyond end().
This commit is contained in:
parent
2d4ffc0dce
commit
9090fb5bf4
4 changed files with 6 additions and 3 deletions
|
@ -1109,6 +1109,8 @@ void FGTower::CheckCircuitList(double dt) {
|
||||||
circuitListItr = circuitList.erase(circuitListItr);
|
circuitListItr = circuitList.erase(circuitListItr);
|
||||||
if(circuitListItr == circuitList.end() ) {
|
if(circuitListItr == circuitList.end() ) {
|
||||||
circuitListItr = circuitList.begin();
|
circuitListItr = circuitList.begin();
|
||||||
|
// avoid increment of circuitListItr (would increment to second element, or crash if no element left)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
++circuitListItr;
|
++circuitListItr;
|
||||||
|
|
|
@ -263,7 +263,7 @@ void FGClouds::buildMETAR(void) {
|
||||||
|
|
||||||
// copy from FGMetarEnvironmentCtrl until better
|
// copy from FGMetarEnvironmentCtrl until better
|
||||||
void
|
void
|
||||||
FGClouds::update_metar_properties( FGMetar *m )
|
FGClouds::update_metar_properties( const FGMetar *m )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
double d;
|
double d;
|
||||||
|
|
|
@ -51,7 +51,7 @@ private:
|
||||||
|
|
||||||
void setLayer( int iLayer, float alt_m, const string& coverage, const string& layer_type );
|
void setLayer( int iLayer, float alt_m, const string& coverage, const string& layer_type );
|
||||||
|
|
||||||
void update_metar_properties( FGMetar *m );
|
void update_metar_properties( const FGMetar *m );
|
||||||
|
|
||||||
void FGClouds::update_env_config ();
|
void FGClouds::update_env_config ();
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,6 @@ void FGTrafficManager::init()
|
||||||
{
|
{
|
||||||
currAircraft=scheduledAircraft.erase(currAircraft);
|
currAircraft=scheduledAircraft.erase(currAircraft);
|
||||||
//cerr << "Erasing " << currAircraft->getRegistration() << endl;
|
//cerr << "Erasing " << currAircraft->getRegistration() << endl;
|
||||||
currAircraft--;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -102,6 +101,8 @@ void FGTrafficManager::init()
|
||||||
void FGTrafficManager::update(double something)
|
void FGTrafficManager::update(double something)
|
||||||
{
|
{
|
||||||
time_t now = time(NULL) + fgGetLong("/sim/time/warp");
|
time_t now = time(NULL) + fgGetLong("/sim/time/warp");
|
||||||
|
if (scheduledAircraft.size() == 0)
|
||||||
|
return;
|
||||||
if(currAircraft == scheduledAircraft.end())
|
if(currAircraft == scheduledAircraft.end())
|
||||||
{
|
{
|
||||||
//cerr << "resetting schedule " << endl;
|
//cerr << "resetting schedule " << endl;
|
||||||
|
|
Loading…
Add table
Reference in a new issue