Utility functions to improve resolution in auto stash component

This commit is contained in:
Klaus Basan
2018-08-26 15:19:51 +02:00
parent 2392a27a59
commit d010f6f15a
5 changed files with 28 additions and 5 deletions

View File

@@ -629,7 +629,7 @@ namespace BlackMisc
const int icaoScore = this->getAircraftIcaoCode().calculateScore(compareModel.getAircraftIcaoCode(), log);
const int liveryScore = this->getLivery().calculateScore(compareModel.getLivery(), preferColorLiveries, log);
CMatchingUtils::addLogDetailsToList(log, this->getCallsign(), QString("ICAO score: %1 | livery score: %2").arg(icaoScore).arg(liveryScore));
return (icaoScore + liveryScore) / 2;
return qRound(0.5 * (icaoScore + liveryScore));
}
CStatusMessageList CAircraftModel::validate(bool withNestedObjects) const