From c20b54466f4f924d5119b9f312015d131e4984a8 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sat, 31 Dec 2016 05:03:44 +0100 Subject: [PATCH] refs #848, some upfront cleanup --- src/blackmisc/identifiable.h | 2 +- src/plugins/simulator/fscommon/fsuipc.h | 2 +- src/plugins/simulator/fsx/simulatorfsx.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/blackmisc/identifiable.h b/src/blackmisc/identifiable.h index 8df0978d1..e6c6dcc8e 100644 --- a/src/blackmisc/identifiable.h +++ b/src/blackmisc/identifiable.h @@ -36,7 +36,7 @@ namespace BlackMisc CIdentifier getCurrentTimestampIdentifier() const; //! My identifier? - bool isMyIdentifier(const CIdentifier &otherIdentifier) { return m_identifier == otherIdentifier; } + bool isMyIdentifier(const CIdentifier &otherIdentifier) const { return m_identifier == otherIdentifier; } protected: //! Use literal based object name diff --git a/src/plugins/simulator/fscommon/fsuipc.h b/src/plugins/simulator/fscommon/fsuipc.h index 4644da697..3fc65b05a 100644 --- a/src/plugins/simulator/fscommon/fsuipc.h +++ b/src/plugins/simulator/fscommon/fsuipc.h @@ -30,7 +30,7 @@ namespace BlackSimPlugin CFsuipc(); //! Destructor - ~CFsuipc(); + virtual ~CFsuipc(); //! Open conenction with FSUIPC bool connect(); diff --git a/src/plugins/simulator/fsx/simulatorfsx.cpp b/src/plugins/simulator/fsx/simulatorfsx.cpp index 37f8a86c3..370e24065 100644 --- a/src/plugins/simulator/fsx/simulatorfsx.cpp +++ b/src/plugins/simulator/fsx/simulatorfsx.cpp @@ -204,7 +204,7 @@ namespace BlackSimPlugin bool changed = false; if (newCom1.getFrequencyActive() != this->m_simCom1.getFrequencyActive()) { - CFrequency newFreq = newCom1.getFrequencyActive(); + const CFrequency newFreq = newCom1.getFrequencyActive(); SimConnect_TransmitClientEvent(m_hSimConnect, 0, EventSetCom1Active, CBcdConversions::comFrequencyToBcdHz(newFreq), SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); changed = true; @@ -212,7 +212,7 @@ namespace BlackSimPlugin } if (newCom1.getFrequencyStandby() != this->m_simCom1.getFrequencyStandby()) { - CFrequency newFreq = newCom1.getFrequencyStandby(); + const CFrequency newFreq = newCom1.getFrequencyStandby(); SimConnect_TransmitClientEvent(m_hSimConnect, 0, EventSetCom1Standby, CBcdConversions::comFrequencyToBcdHz(newFreq), SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); changed = true; @@ -220,14 +220,14 @@ namespace BlackSimPlugin if (newCom2.getFrequencyActive() != this->m_simCom2.getFrequencyActive()) { - CFrequency newFreq = newCom2.getFrequencyActive(); + const CFrequency newFreq = newCom2.getFrequencyActive(); SimConnect_TransmitClientEvent(m_hSimConnect, 0, EventSetCom2Active, CBcdConversions::comFrequencyToBcdHz(newFreq), SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); changed = true; } if (newCom2.getFrequencyStandby() != this->m_simCom2.getFrequencyStandby()) { - CFrequency newFreq = newCom2.getFrequencyStandby(); + const CFrequency newFreq = newCom2.getFrequencyStandby(); SimConnect_TransmitClientEvent(m_hSimConnect, 0, EventSetCom2Standby, CBcdConversions::comFrequencyToBcdHz(newFreq), SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); changed = true;