mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
FP style
This commit is contained in:
committed by
Mat Sutcliffe
parent
0e03e7baf0
commit
e31fa91052
@@ -167,7 +167,7 @@ namespace BlackMisc
|
||||
else if (this->hasValidCombinedType())
|
||||
{
|
||||
if (this->getEnginesCount() == otherCode.getEnginesCount()) { score += 2; }
|
||||
if (this->getEngineType() == otherCode.getEngineType()) { score += 2; }
|
||||
if (this->getEngineType() == otherCode.getEngineType()) { score += 2; }
|
||||
if (this->getAircraftType() == otherCode.getAircraftType()) { score += 2; }
|
||||
CMatchingUtils::addLogDetailsToList(log, *this, QStringLiteral("Added combined code parts: %1").arg(score));
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ namespace BlackMisc
|
||||
CAircraftIcaoCode CAircraftIcaoCodeList::findFirstByDesignatorAndRank(const QString &designator) const
|
||||
{
|
||||
if (!CAircraftIcaoCode::isValidDesignator(designator)) { return CAircraftIcaoCode(); }
|
||||
CAircraftIcaoCodeList codes(findByDesignator(designator));
|
||||
CAircraftIcaoCodeList codes(this->findByDesignator(designator));
|
||||
if (codes.isEmpty()) { return CAircraftIcaoCode(); }
|
||||
if (codes.size() < 2) { return codes.front(); }
|
||||
codes.sortBy(&CAircraftIcaoCode::getRank, &CAircraftIcaoCode::getDbKey);
|
||||
|
||||
Reference in New Issue
Block a user