mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Ref T270, mark interpolator as unit test
* if we use "recycled" parts, we have to store also the last status * mark unit test so "recycling" is disabled * status flag for "reused"
This commit is contained in:
@@ -292,6 +292,8 @@ namespace BlackMisc
|
||||
Q_ASSERT_X(m_partsToSituationInterpolationRatio >= 1 && m_partsToSituationInterpolationRatio < 11, Q_FUNC_INFO, "Wrong ratio");
|
||||
if (!m_unitTest && !m_lastParts.isNull() && ((m_interpolatedSituationsCounter + aircraftNumber) % m_partsToSituationInterpolationRatio) == 0)
|
||||
{
|
||||
m_currentPartsStatus = m_lastPartsStatus;
|
||||
m_currentPartsStatus.setReusedParts(true);
|
||||
return m_lastParts;
|
||||
}
|
||||
|
||||
@@ -312,6 +314,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
m_lastParts = parts;
|
||||
m_lastPartsStatus = m_currentPartsStatus;
|
||||
return parts;
|
||||
}
|
||||
|
||||
@@ -513,6 +516,7 @@ namespace BlackMisc
|
||||
void CPartsStatus::reset()
|
||||
{
|
||||
m_supportsParts = false;
|
||||
m_resusedParts = false;
|
||||
}
|
||||
|
||||
// see here for the reason of thess forward instantiations
|
||||
|
||||
Reference in New Issue
Block a user