Style and comments

This commit is contained in:
Klaus Basan
2018-07-12 01:57:56 +02:00
parent dd4ce91744
commit 6af1998f58
5 changed files with 6 additions and 2 deletions

View File

@@ -82,6 +82,7 @@ namespace BlackMisc
const CAircraftSituationChangeList changes = this->remoteAircraftSituationChanges(m_callsign);
m_pastSituationsChange = (changes.size() > 1) ? changes[1] : CAircraftSituationChange::null();
// fixing offset
if (setup.isFixingSceneryOffset() && m_pastSituationsChange.hasSceneryDeviation() && m_model.hasCG())
{
const CLength os = m_pastSituationsChange.getGuessedSceneryDeviationCG();

View File

@@ -416,8 +416,9 @@ namespace BlackMisc
void CRemoteAircraftProvider::storeChange(const CAircraftSituationChange &change)
{
QWriteLocker lock(&m_lockChanges);
// a change with the same timestamp will be replaced
const CCallsign cs(change.getCallsign());
QWriteLocker lock(&m_lockChanges);
CAircraftSituationChangeList &changeList = m_changesByCallsign[cs];
changeList.push_frontKeepLatestAdjustedFirst(change, true, IRemoteAircraftProvider::MaxSituationsPerCallsign);
}

View File

@@ -420,7 +420,7 @@ namespace BlackMisc
Aviation::CAircraftSituationPerCallsign m_latestSituationByCallsign; //!< latest situations, for performance reasons per callsign, thread safe access required
Aviation::CAircraftSituationPerCallsign m_latestOnGroundProviderElevation; //!< situation on ground with elevation from provider
Aviation::CAircraftPartsListPerCallsign m_partsByCallsign; //!< parts, for performance reasons per callsign, thread safe access required
Aviation::CAircraftSituationChangeListPerCallsign m_changesByCallsign; //!< changes, for performance reasons per callsign, thread safe access required
Aviation::CAircraftSituationChangeListPerCallsign m_changesByCallsign; //!< changes, for performance reasons per callsign, thread safe access required (same timestamps as corresponding situations)
Aviation::CCallsignSet m_aircraftWithParts; //!< aircraft supporting parts, thread safe access required
int m_situationsAdded = 0; //!< total number of situations added, thread safe access required
int m_partsAdded = 0; //!< total number of parts added, thread safe access required