refactor: Fix readability-use-std-min-max

This commit is contained in:
Lars Toenning
2025-10-25 15:49:22 +02:00
parent 369450107b
commit 8a877e85b7
15 changed files with 23 additions and 23 deletions

View File

@@ -821,7 +821,7 @@ namespace swift::simplugin::flightgear
const qint64 wasStartedMs = m_addingInProgressAircraft.value(cs);
const qint64 deltaTimeMs = QDateTime::currentMSecsSinceEpoch() - wasStartedMs;
m_statsAddCurrentTimeMs = deltaTimeMs;
if (deltaTimeMs > m_statsAddMaxTimeMs) { m_statsAddMaxTimeMs = deltaTimeMs; }
m_statsAddMaxTimeMs = std::max(deltaTimeMs, m_statsAddMaxTimeMs);
m_addingInProgressAircraft.remove(cs);
}

View File

@@ -1171,7 +1171,7 @@ namespace swift::simplugin::xplane
const qint64 wasStartedMs = m_addingInProgressAircraft.value(cs);
const qint64 deltaTimeMs = QDateTime::currentMSecsSinceEpoch() - wasStartedMs;
m_statsAddCurrentTimeMs = deltaTimeMs;
if (deltaTimeMs > m_statsAddMaxTimeMs) { m_statsAddMaxTimeMs = deltaTimeMs; }
m_statsAddMaxTimeMs = std::max(deltaTimeMs, m_statsAddMaxTimeMs);
m_addingInProgressAircraft.remove(cs);
}