Formatting, #825 (matching)

This commit is contained in:
Klaus Basan
2017-03-08 01:17:50 +01:00
committed by Mathew Sutcliffe
parent eabb576b67
commit 35c685b344
5 changed files with 16 additions and 16 deletions

View File

@@ -24,6 +24,7 @@
#include <QList>
#include <QStringList>
#include <QtGlobal>
#include <QStringBuilder>
using namespace BlackMisc;
using namespace BlackMisc::Simulation;
@@ -239,8 +240,7 @@ namespace BlackCore
CMatchingUtils::addLogDetailsToList(log, callsign, QString("Using model: ICAO '%1', livery '%2', model '%3', type '%4'").
arg(model.getAircraftIcaoCode().getCombinedIcaoStringWithKey(),
model.getLivery().getCombinedCodePlusInfo(),
model.getModelString(), model.getModelTypeAsString())
);
model.getModelString(), model.getModelTypeAsString()));
}
return model;
}
@@ -852,16 +852,16 @@ namespace BlackCore
{
str += '\n';
}
str += QString::number(c);
str += ": score: ";
str += QString::number(i.key());
str += " model: '";
str += m.getModelString();
str += "' aircraft: '";
str += m.getAircraftIcaoCodeDesignator();
str += "' livery: '";
str += m.getLivery().getCombinedCodePlusInfo();
str += "'";
str += QString::number(c) %
QLatin1String(": score: ") %
QString::number(i.key()) %
QLatin1String(" model: '") %
m.getModelString() %
QLatin1String("' aircraft: '") %
m.getAircraftIcaoCodeDesignator() %
QLatin1String("' livery: '") %
m.getLivery().getCombinedCodePlusInfo() %
QLatin1Char('\'');
}
return str;
}

View File

@@ -116,7 +116,7 @@ namespace BlackMisc
int score = 0;
if (this->hasValidDesignator() && this->getDesignator() == otherCode.getDesignator())
{
score += 50;
score += 50; // same designator
if (this->getRank() == 0) { score += 15; }
else if (this->getRank() == 1) { score += 12; }

View File

@@ -251,7 +251,7 @@ namespace BlackMisc
//! As a brief HTML summary (e.g. used in tooltips)
QString asHtmlSummary() const;
//! Considers rank, manufacturer and family 0..90
//! Considers rank, manufacturer and family 0..100
//! \remark normally used with a selected set of ICAO codes or combined types
int calculateScore(const CAircraftIcaoCode &otherCode) const;

View File

@@ -405,7 +405,7 @@ namespace BlackMisc
if (score == 0) { return 0; }
if (this->isAirlineStandardLivery() && !preferColorLiveries) { score += 10; }
// overrate non airline liveries
// overrate non airline liveries / color liveries
if (preferColorLiveries)
{
if (this->isColorLivery() || !this->hasValidAirlineDesignator())

View File

@@ -126,7 +126,7 @@ namespace BlackMisc
QString CAircraftModel::asHtmlSummary(const QString &separator) const
{
const QString html = "Model: %1%2Aircraft ICAO: %3%4Livery: %5";
static const QString html = "Model: %1%2Aircraft ICAO: %3%4Livery: %5";
return html.arg(this->getModelStringAndDbKey(), separator,
this->getAircraftIcaoCode().asHtmlSummary(), separator,
this->getLivery().asHtmlSummary());