mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
Ref T182, adjust scoring in livery, ICAO codes
This commit is contained in:
@@ -362,21 +362,21 @@ namespace BlackMisc
|
||||
|
||||
int CAirlineIcaoCode::calculateScore(const CAirlineIcaoCode &otherCode) const
|
||||
{
|
||||
const bool bothFromDb = otherCode.isLoadedFromDb() && this->isLoadedFromDb();
|
||||
if (bothFromDb && this->getDbKey() == otherCode.getDbKey())
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
if (this->isDbEqual(otherCode)) { return 100; }
|
||||
const bool bothFromDb = this->isLoadedFromDb() && otherCode.isLoadedFromDb();
|
||||
int score = 0;
|
||||
if (otherCode.hasValidDesignator() && this->getDesignator() == otherCode.getDesignator())
|
||||
{
|
||||
score += 60;
|
||||
}
|
||||
|
||||
// only for DB values we check VA
|
||||
if (bothFromDb && this->isVirtualAirline() == otherCode.isVirtualAirline())
|
||||
{
|
||||
score += 20;
|
||||
}
|
||||
|
||||
// consider the various names
|
||||
if (this->hasName() && this->getName() == otherCode.getName())
|
||||
{
|
||||
score += 20;
|
||||
|
||||
Reference in New Issue
Block a user