mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
Fix cppcheck warnings
This commit is contained in:
@@ -498,8 +498,7 @@ namespace BlackSimPlugin::FsCommon
|
||||
// position
|
||||
const double latCorrectionFactor = 90.0 / (10001750.0 * 65536.0 * 65536.0);
|
||||
const double lonCorrectionFactor = 360.0 / (65536.0 * 65536.0 * 65536.0 * 65536.0);
|
||||
// cppcheck-suppress shadowArgument
|
||||
CAircraftSituation situation = aircraft.getSituation();
|
||||
CAircraftSituation situation = aircraft.getSituation(); // cppcheck-suppress shadowArgument
|
||||
CCoordinateGeodetic position = situation.getPosition();
|
||||
CLatitude lat(latitudeRaw * latCorrectionFactor, CAngleUnit::deg());
|
||||
CLongitude lon(longitudeRaw * lonCorrectionFactor, CAngleUnit::deg());
|
||||
|
||||
@@ -1214,7 +1214,7 @@ namespace BlackSimPlugin::FsxCommon
|
||||
verified = true;
|
||||
}
|
||||
|
||||
if (!verified)
|
||||
if (!verified) // cppcheck-suppress knownConditionTrueFalse
|
||||
{
|
||||
CLogMessage(this).info(u"Disable probes: '%1' failed to relase control") << cs.asString();
|
||||
m_useFsxTerrainProbe = false;
|
||||
@@ -2641,8 +2641,7 @@ namespace BlackSimPlugin::FsxCommon
|
||||
void CSimulatorFsxCommon::traceSendId(const CSimConnectObject &simObject, const QString &functionName, const QString &details, bool forceTrace)
|
||||
{
|
||||
if (!forceTrace && !this->isTracingSendId()) { return; }
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
if (MaxSendIdTraces < 1) { return; }
|
||||
if (MaxSendIdTraces < 1) { return; } // cppcheck-suppress knownConditionTrueFalse
|
||||
DWORD dwLastId = 0;
|
||||
const HRESULT hr = SimConnect_GetLastSentPacketID(m_hSimConnect, &dwLastId);
|
||||
if (isFailure(hr)) { return; }
|
||||
|
||||
Reference in New Issue
Block a user