refs #937 Resolved clazy warnings: unnecessary memory allocation.

This commit is contained in:
Mathew Sutcliffe
2017-04-17 00:03:33 +01:00
parent fce1513dae
commit b7f69c6887
26 changed files with 52 additions and 51 deletions

View File

@@ -165,7 +165,7 @@ namespace BlackCore
qint64 timeoutAircraftEpochMs = currentTimeMsEpoch - aircraftTimeoutMs;
qint64 timeoutAtcEpochMs = currentTimeMsEpoch - atcTimeoutMs;
for (const CCallsign &callsign : m_aircraftCallsignTimestamps.keys())
for (const CCallsign &callsign : m_aircraftCallsignTimestamps.keys()) // clazy:exclude=container-anti-pattern,range-loop
{
if (m_aircraftCallsignTimestamps.value(callsign) > timeoutAircraftEpochMs) { continue; }
CLogMessage(this).debug() << "Aircraft " << callsign.toQString() << "timed out!";
@@ -173,7 +173,7 @@ namespace BlackCore
emit timeoutAircraft(callsign);
}
for (const CCallsign &callsign : m_atcCallsignTimestamps.keys())
for (const CCallsign &callsign : m_atcCallsignTimestamps.keys()) // clazy:exclude=container-anti-pattern,range-loop
{
if (m_atcCallsignTimestamps.value(callsign) > timeoutAtcEpochMs) { continue; }
CLogMessage(this).debug() << "ATC " << callsign.toQString() << "timed out!";