Unverified Commit 8db8877c authored by Lorenz Meier's avatar Lorenz Meier Committed by GitHub

Clang 12 compile error fixes (#9118)

* Clang 12: Fix Autopilotplugin compile warning

* Clang 12: Fix Vehicle CompInfo compile errors
parent 4db32dd1
...@@ -61,7 +61,7 @@ void AutoPilotPlugin::parametersReadyPreChecks(void) ...@@ -61,7 +61,7 @@ void AutoPilotPlugin::parametersReadyPreChecks(void)
_recalcSetupComplete(); _recalcSetupComplete();
// Connect signals in order to keep setupComplete up to date // Connect signals in order to keep setupComplete up to date
for(const QVariant componentVariant: vehicleComponents()) { for(QVariant componentVariant: vehicleComponents()) {
VehicleComponent* component = qobject_cast<VehicleComponent*>(qvariant_cast<QObject *>(componentVariant)); VehicleComponent* component = qobject_cast<VehicleComponent*>(qvariant_cast<QObject *>(componentVariant));
if (component) { if (component) {
connect(component, &VehicleComponent::setupCompleteChanged, this, &AutoPilotPlugin::_recalcSetupComplete); connect(component, &VehicleComponent::setupCompleteChanged, this, &AutoPilotPlugin::_recalcSetupComplete);
......
...@@ -241,7 +241,7 @@ void TerrainAirMapQuery::_parsePathData(const QJsonValue& pathJson) ...@@ -241,7 +241,7 @@ void TerrainAirMapQuery::_parsePathData(const QJsonValue& pathJson)
double lonStep = stepArray[1].toDouble(); double lonStep = stepArray[1].toDouble();
QList<double> heights; QList<double> heights;
for (const QJsonValue& profileValue: profileArray) { for (QJsonValue profileValue: profileArray) {
heights.append(profileValue.toDouble()); heights.append(profileValue.toDouble());
} }
......
...@@ -67,7 +67,7 @@ void CompInfoParam::setJson(const QString& metadataJsonFileName, const QString& ...@@ -67,7 +67,7 @@ void CompInfoParam::setJson(const QString& metadataJsonFileName, const QString&
} }
QJsonArray rgParameters = jsonObj[_jsonParametersKey].toArray(); QJsonArray rgParameters = jsonObj[_jsonParametersKey].toArray();
for (const QJsonValue& parameterValue: rgParameters) { for (QJsonValue parameterValue: rgParameters) {
QMap<QString, QString> emptyDefineMap; QMap<QString, QString> emptyDefineMap;
if (!parameterValue.isObject()) { if (!parameterValue.isObject()) {
......
...@@ -59,7 +59,7 @@ void CompInfoVersion::setJson(const QString& metadataJsonFileName, const QString ...@@ -59,7 +59,7 @@ void CompInfoVersion::setJson(const QString& metadataJsonFileName, const QString
} }
QJsonArray rgSupportedTypes = jsonObj[_jsonSupportedCompMetadataTypesKey].toArray(); QJsonArray rgSupportedTypes = jsonObj[_jsonSupportedCompMetadataTypesKey].toArray();
for (const QJsonValue& typeValue: rgSupportedTypes) { for (QJsonValue typeValue: rgSupportedTypes) {
_supportedTypes.append(static_cast<COMP_METADATA_TYPE>(typeValue.toInt())); _supportedTypes.append(static_cast<COMP_METADATA_TYPE>(typeValue.toInt()));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment