mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-24 18:04:14 +08:00
Fix clang-tidy and clazy warnings
This commit is contained in:
@@ -544,7 +544,7 @@ namespace BlackMisc
|
||||
return this->getOnGroundDetails() != CAircraftSituation::NotSetGroundDetails;
|
||||
}
|
||||
|
||||
const QString CAircraftSituation::getOnGroundDetailsAsString() const
|
||||
const QString &CAircraftSituation::getOnGroundDetailsAsString() const
|
||||
{
|
||||
return CAircraftSituation::onGroundDetailsToString(this->getOnGroundDetails());
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace BlackMisc
|
||||
bool hasGroundDetailsForGndInterpolation() const;
|
||||
|
||||
//! On ground reliability as string
|
||||
const QString getOnGroundDetailsAsString() const;
|
||||
const QString &getOnGroundDetailsAsString() const;
|
||||
|
||||
//! On ground details
|
||||
bool setOnGroundDetails(CAircraftSituation::OnGroundDetails details);
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace BlackMisc
|
||||
}
|
||||
}
|
||||
|
||||
const QString CAirlineIcaoCode::getVDesignator() const
|
||||
QString CAirlineIcaoCode::getVDesignator() const
|
||||
{
|
||||
if (!this->isVirtualAirline()) { return m_designator; }
|
||||
return u'V' % m_designator;
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace BlackMisc
|
||||
const QString &getDesignator() const { return m_designator; }
|
||||
|
||||
//! Get airline, e.g. "DLH", but "VMVA" for virtual airlines
|
||||
const QString getVDesignator() const;
|
||||
QString getVDesignator() const;
|
||||
|
||||
//! Get VDesignator plus key
|
||||
QString getVDesignatorDbKey() const;
|
||||
|
||||
@@ -218,7 +218,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
CAirlineIcaoCodeList step1Data = airlineName.isEmpty() ? *this : this->findByNamesOrTelephonyDesignator(airlineName);
|
||||
if (step1Data.size() < 1 || step1Data.size() == this->size())
|
||||
if (step1Data.isEmpty() || step1Data.size() == this->size())
|
||||
{
|
||||
if (log) { CCallsign::addLogDetailsToList(log, cs, loginfo % QStringLiteral(" cannot reduce by '%1'").arg(airlineName), getLogCategories()); }
|
||||
step1Data = *this;
|
||||
@@ -231,7 +231,7 @@ namespace BlackMisc
|
||||
if (step1Data.size() == 1) { return step1Data; }
|
||||
|
||||
CAirlineIcaoCodeList step2Data = telephony.isEmpty() ? step1Data : step1Data.findByNamesOrTelephonyDesignator(telephony);
|
||||
if (step2Data.size() < 1 || step2Data.size() == this->size())
|
||||
if (step2Data.isEmpty() || step2Data.size() == this->size())
|
||||
{
|
||||
if (log) { CCallsign::addLogDetailsToList(log, cs, loginfo % QStringLiteral(" cannot reduce by name '%1'").arg(telephony), getLogCategories()); }
|
||||
step2Data = step1Data;
|
||||
@@ -244,7 +244,7 @@ namespace BlackMisc
|
||||
if (step2Data.size() == 1) { return step2Data; }
|
||||
|
||||
CAirlineIcaoCodeList step3Data = countryIso.isEmpty() ? step2Data : step2Data.findByCountryIsoCode(countryIso);
|
||||
if (step3Data.size() < 1 || step3Data.size() == this->size())
|
||||
if (step3Data.isEmpty() || step3Data.size() == this->size())
|
||||
{
|
||||
if (log) { CCallsign::addLogDetailsToList(log, cs, loginfo % QStringLiteral(" cannot reduce by country '%1'").arg(countryIso), getLogCategories()); }
|
||||
step3Data = step2Data;
|
||||
|
||||
Reference in New Issue
Block a user