Ref T259, Ref T243 improved utility functions so parts can be guessed in interpolator

* engine count
* aligned naming to "getEnginesCount"
* formatting
This commit is contained in:
Klaus Basan
2018-04-06 00:30:52 +02:00
committed by Roland Winklmeier
parent c3f05ea1cd
commit e3d17859a0
10 changed files with 150 additions and 90 deletions

View File

@@ -164,7 +164,7 @@ namespace BlackMisc
}
else if (this->hasValidCombinedType())
{
if (this->getEngineCount() == otherCode.getEngineCount()) { score += 2; }
if (this->getEnginesCount() == otherCode.getEnginesCount()) { score += 2; }
if (this->getEngineType() == otherCode.getEngineType()) { score += 2; }
if (this->getAircraftType() == otherCode.getAircraftType()) { score += 2; }
CMatchingUtils::addLogDetailsToList(log, *this, QString("Added combined code parts: %1").arg(score));
@@ -249,7 +249,7 @@ namespace BlackMisc
return m_combinedType.right(1);
}
int CAircraftIcaoCode::getEngineCount() const
int CAircraftIcaoCode::getEnginesCount() const
{
if (m_combinedType.length() < 2) { return -1; }
const QString c(m_combinedType.mid(1, 1));
@@ -321,7 +321,7 @@ namespace BlackMisc
}
if (c != '*')
{
if (getEngineCount() != c.digitValue()) { return false; }
if (getEnginesCount() != c.digitValue()) { return false; }
}
if (et == '*') { return true; }
const QString cet = this->getEngineType();