mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T238, logParts and getInterpolatedParts can be const
This commit is contained in:
@@ -201,7 +201,7 @@ namespace BlackMisc
|
||||
|
||||
template <typename Derived>
|
||||
CAircraftParts CInterpolator<Derived>::getInterpolatedParts(qint64 currentTimeMsSinceEpoch,
|
||||
const CInterpolationAndRenderingSetup &setup, CPartsStatus &partsStatus, bool log)
|
||||
const CInterpolationAndRenderingSetup &setup, CPartsStatus &partsStatus, bool log) const
|
||||
{
|
||||
Q_UNUSED(setup);
|
||||
partsStatus.reset();
|
||||
@@ -268,7 +268,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
template<typename Derived>
|
||||
void CInterpolator<Derived>::logParts(qint64 timestamp, const CAircraftParts &parts, bool empty, bool log)
|
||||
void CInterpolator<Derived>::logParts(qint64 timestamp, const CAircraftParts &parts, bool empty, bool log) const
|
||||
{
|
||||
if (!log || !m_logger) { return; }
|
||||
CInterpolationLogger::PartsLog logInfo;
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace BlackMisc
|
||||
|
||||
//! Parts before given offset time (aka pending parts)
|
||||
Aviation::CAircraftParts getInterpolatedParts(
|
||||
qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetup &setup, CPartsStatus &partsStatus, bool log = false);
|
||||
qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetup &setup, CPartsStatus &partsStatus, bool log = false) const;
|
||||
|
||||
//! Add a new aircraft situation
|
||||
void addAircraftSituation(const Aviation::CAircraftSituation &situation);
|
||||
@@ -101,7 +101,7 @@ namespace BlackMisc
|
||||
CInterpolationLogger *m_logger = nullptr;
|
||||
|
||||
//! Log parts
|
||||
void logParts(qint64 timestamp, const Aviation::CAircraftParts &parts, bool empty, bool log);
|
||||
void logParts(qint64 timestamp, const Aviation::CAircraftParts &parts, bool empty, bool log) const;
|
||||
|
||||
Derived *derived() { return static_cast<Derived *>(this); }
|
||||
const Derived *derived() const { return static_cast<const Derived *>(this); }
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace BlackMisc
|
||||
|
||||
//! \copydoc CInterpolator::getInterpolatedParts
|
||||
BlackMisc::Aviation::CAircraftParts getInterpolatedParts(
|
||||
qint64, const CInterpolationAndRenderingSetup &, CPartsStatus &, bool = false) { return {}; }
|
||||
qint64, const CInterpolationAndRenderingSetup &, CPartsStatus &, bool = false) const { return {}; }
|
||||
|
||||
//! \copydoc CInterpolator::addAircraftSituation
|
||||
void addAircraftSituation(const BlackMisc::Aviation::CAircraftSituation &) {}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace BlackMisc
|
||||
|
||||
CAircraftParts CInterpolatorMulti::getInterpolatedParts(
|
||||
qint64 currentTimeSinceEpoc, const CInterpolationAndRenderingSetup &setup,
|
||||
CPartsStatus &partsStatus, bool log)
|
||||
CPartsStatus &partsStatus, bool log) const
|
||||
{
|
||||
switch (m_mode)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace BlackMisc
|
||||
Aviation::CAircraftParts getInterpolatedParts(
|
||||
qint64 currentTimeSinceEpoc,
|
||||
const CInterpolationAndRenderingSetup &setup,
|
||||
CPartsStatus &partsStatus, bool log = false);
|
||||
CPartsStatus &partsStatus, bool log = false) const;
|
||||
|
||||
//! \copydoc CInterpolator::addAircraftSituation
|
||||
void addAircraftSituation(const Aviation::CAircraftSituation &situation);
|
||||
|
||||
Reference in New Issue
Block a user