mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 14:47:19 +08:00
refs #820, utility functions for score and groupBy
This commit is contained in:
@@ -584,6 +584,13 @@ namespace BlackMisc
|
||||
this->m_modelString.startsWith(modelString, sensitivity);
|
||||
}
|
||||
|
||||
int CAircraftModel::calculateScore(const CAircraftModel &compareModel) const
|
||||
{
|
||||
int score = this->getAircraftIcaoCode().calculateScore(compareModel.getAircraftIcaoCode());
|
||||
score += this->getLivery().calculateScore(compareModel.getLivery());
|
||||
return 0.5 * score;
|
||||
}
|
||||
|
||||
CStatusMessageList CAircraftModel::validate(bool withNestedObjects) const
|
||||
{
|
||||
static const CLogCategoryList cats(CLogCategoryList(this).join({ CLogCategory::validation() }));
|
||||
|
||||
Reference in New Issue
Block a user