mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
refs #789, improvements when addressing FSX driver issue
* added new utility funtion is model list / aircraft list * added setters/getters for CSimConnectObject * added setters/getters for InterpolationStatus / PartsStatus * added CSimConnectObjects (better encapsulation)
This commit is contained in:
@@ -153,5 +153,18 @@ namespace BlackMisc
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CSimulatedAircraftList::replaceOrAddByCallsign(const CSimulatedAircraft &aircraft)
|
||||
{
|
||||
const CCallsign cs(aircraft.getCallsign());
|
||||
if (cs.isEmpty()) { return false; }
|
||||
|
||||
if (this->containsCallsign(cs))
|
||||
{
|
||||
int c = this->replaceIf(&CSimulatedAircraft::getCallsign, cs, aircraft);
|
||||
return c > 0;
|
||||
}
|
||||
this->push_back(aircraft);
|
||||
return true;
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user