refs #825, utility functions

* allow to prefer color liveries (idea: when no airline is found, a neutral livery looks better)
* pick randomly among equal scores
This commit is contained in:
Klaus Basan
2016-12-07 03:01:18 +01:00
parent 78099c0ebe
commit 3b25781a06
6 changed files with 36 additions and 10 deletions

View File

@@ -175,7 +175,7 @@ namespace BlackMisc
//! Score by comparison to another livery 0..100
//! \remark normally used with liveries preselect by airline ICAO code
int calculateScore(const CLivery &otherLivery) const;
int calculateScore(const CLivery &otherLivery, bool preferColorLiveries = false) const;
//! Object from JSON
static CLivery fromDatabaseJson(const QJsonObject &json, const QString &prefix = QString("liv_"));