mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 08:36:52 +08:00
refactor: Change variable type of aircraftNumber
The aircraft number should always be positive
This commit is contained in:
@@ -524,7 +524,7 @@ namespace BlackSimPlugin::Emulated
|
||||
{
|
||||
const qint64 now = QDateTime::currentMSecsSinceEpoch();
|
||||
const bool updateAllAircraft = this->isUpdateAllRemoteAircraft(now);
|
||||
int aircraftNumber = 0;
|
||||
uint32_t aircraftNumber = 0;
|
||||
|
||||
for (const CSimulatedAircraft &aircraft : m_renderedAircraft)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace BlackSimPlugin::Flightgear
|
||||
m_interpolator->attachLogger(logger);
|
||||
}
|
||||
|
||||
CInterpolationResult CFlightgearMPAircraft::getInterpolation(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, int aircraftNumber) const
|
||||
CInterpolationResult CFlightgearMPAircraft::getInterpolation(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const
|
||||
{
|
||||
Q_ASSERT(m_interpolator);
|
||||
return m_interpolator->getInterpolation(currentTimeSinceEpoc, setup, aircraftNumber);
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace BlackSimPlugin::Flightgear
|
||||
void attachInterpolatorLogger(BlackMisc::Simulation::CInterpolationLogger *logger) const;
|
||||
|
||||
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolation
|
||||
BlackMisc::Simulation::CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoc, const BlackMisc::Simulation::CInterpolationAndRenderingSetupPerCallsign &setup, int aircraftNumber) const;
|
||||
BlackMisc::Simulation::CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoc, const BlackMisc::Simulation::CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const;
|
||||
|
||||
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolationMessages
|
||||
BlackMisc::CStatusMessageList getInterpolationMessages(BlackMisc::Simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const;
|
||||
|
||||
@@ -637,7 +637,7 @@ namespace BlackSimPlugin::Flightgear
|
||||
PlanesSurfaces planesSurfaces;
|
||||
PlanesTransponders planesTransponders;
|
||||
|
||||
int aircraftNumber = 0;
|
||||
uint32_t aircraftNumber = 0;
|
||||
const bool updateAllAircraft = this->isUpdateAllRemoteAircraft(currentTimestamp);
|
||||
const CCallsignSet callsignsInRange = this->getAircraftInRangeCallsigns();
|
||||
for (const CFlightgearMPAircraft &flightgearAircraft : std::as_const(m_flightgearAircraftObjects))
|
||||
|
||||
@@ -205,7 +205,7 @@ namespace BlackSimPlugin::FsxCommon
|
||||
m_interpolator->attachLogger(logger);
|
||||
}
|
||||
|
||||
CInterpolationResult CSimConnectObject::getInterpolation(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, int aircraftNumber) const
|
||||
CInterpolationResult CSimConnectObject::getInterpolation(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const
|
||||
{
|
||||
if (!m_interpolator)
|
||||
{
|
||||
|
||||
@@ -275,7 +275,7 @@ namespace BlackSimPlugin::FsxCommon
|
||||
void attachInterpolatorLogger(BlackMisc::Simulation::CInterpolationLogger *logger) const;
|
||||
|
||||
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolation
|
||||
BlackMisc::Simulation::CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoc, const BlackMisc::Simulation::CInterpolationAndRenderingSetupPerCallsign &setup, int aircraftNumber) const;
|
||||
BlackMisc::Simulation::CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoc, const BlackMisc::Simulation::CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const;
|
||||
|
||||
//! \copydoc BlackMisc::Simulation::CInterpolator::getLastInterpolatedSituation
|
||||
const BlackMisc::Aviation::CAircraftSituation &getLastInterpolatedSituation(BlackMisc::Simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const;
|
||||
|
||||
@@ -1930,7 +1930,7 @@ namespace BlackSimPlugin::FsxCommon
|
||||
// interpolation for all remote aircraft
|
||||
const QList<CSimConnectObject> simObjects(m_simConnectObjects.values());
|
||||
|
||||
int simObjectNumber = 0;
|
||||
uint32_t simObjectNumber = 0;
|
||||
const bool traceSendId = this->isTracingSendId();
|
||||
const bool updateAllAircraft = this->isUpdateAllRemoteAircraft(currentTimestamp);
|
||||
for (const CSimConnectObject &simObject : simObjects)
|
||||
|
||||
@@ -918,7 +918,7 @@ namespace BlackSimPlugin::XPlane
|
||||
PlanesSurfaces planesSurfaces;
|
||||
PlanesTransponders planesTransponders;
|
||||
|
||||
int aircraftNumber = 0;
|
||||
uint32_t aircraftNumber = 0;
|
||||
const bool updateAllAircraft = this->isUpdateAllRemoteAircraft(currentTimestamp);
|
||||
const CCallsignSet callsignsInRange = this->getAircraftInRangeCallsigns();
|
||||
for (const CXPlaneMPAircraft &xplaneAircraft : std::as_const(m_xplaneAircraftObjects))
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace BlackSimPlugin::XPlane
|
||||
m_interpolator->attachLogger(logger);
|
||||
}
|
||||
|
||||
CInterpolationResult CXPlaneMPAircraft::getInterpolation(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, int aircraftNumber) const
|
||||
CInterpolationResult CXPlaneMPAircraft::getInterpolation(qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const
|
||||
{
|
||||
Q_ASSERT(m_interpolator);
|
||||
return m_interpolator->getInterpolation(currentTimeSinceEpoc, setup, aircraftNumber);
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace BlackSimPlugin::XPlane
|
||||
void attachInterpolatorLogger(BlackMisc::Simulation::CInterpolationLogger *logger) const;
|
||||
|
||||
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolation
|
||||
BlackMisc::Simulation::CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoc, const BlackMisc::Simulation::CInterpolationAndRenderingSetupPerCallsign &setup, int aircraftNumber) const;
|
||||
BlackMisc::Simulation::CInterpolationResult getInterpolation(qint64 currentTimeSinceEpoc, const BlackMisc::Simulation::CInterpolationAndRenderingSetupPerCallsign &setup, uint32_t aircraftNumber) const;
|
||||
|
||||
//! \copydoc BlackMisc::Simulation::CInterpolator::getInterpolationMessages
|
||||
BlackMisc::CStatusMessageList getInterpolationMessages(BlackMisc::Simulation::CInterpolationAndRenderingSetupBase::InterpolatorMode mode) const;
|
||||
|
||||
Reference in New Issue
Block a user