mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
[XP driver] Using unsigned for timer call counters, to avoid UB on overflow
This commit is contained in:
@@ -366,7 +366,7 @@ namespace BlackSimPlugin
|
||||
}
|
||||
|
||||
// FPS
|
||||
if ((m_slowTimerCalls % 5) == 0)
|
||||
if ((m_slowTimerCalls % 5u) == 0u)
|
||||
{
|
||||
// reading FPS resets average, so we only monitor over some time
|
||||
m_serviceProxy->getFrameStats(&m_averageFps, &m_simTimeRatio);
|
||||
|
||||
@@ -250,8 +250,8 @@ namespace BlackSimPlugin
|
||||
QTimer m_slowTimer;
|
||||
QTimer m_airportUpdater;
|
||||
QTimer m_pendingAddedTimer;
|
||||
int m_fastTimerCalls = 0; //!< how often called
|
||||
int m_slowTimerCalls = 0; //!< how often called
|
||||
unsigned int m_fastTimerCalls = 0; //!< how often called
|
||||
unsigned int m_slowTimerCalls = 0; //!< how often called
|
||||
|
||||
BlackMisc::Aviation::CAirportList m_airportsInRange; //!< aiports in range of own aircraft
|
||||
BlackMisc::Simulation::CSimulatedAircraftList m_pendingToBeAddedAircraft; //!< aircraft to be added
|
||||
|
||||
Reference in New Issue
Block a user