diff --git a/src/app/CASEClientPool.h b/src/app/CASEClientPool.h index 99bc913793e738..f44d487771c8fc 100644 --- a/src/app/CASEClientPool.h +++ b/src/app/CASEClientPool.h @@ -36,7 +36,7 @@ template class CASEClientPool : public CASEClientPoolDelegate { public: - ~CASEClientPool() { mClientPool.ReleaseAll(); } + ~CASEClientPool() override { mClientPool.ReleaseAll(); } CASEClient * Allocate(CASEClientInitParams params) override { return mClientPool.CreateObject(params); } diff --git a/src/app/CommandSender.h b/src/app/CommandSender.h index 53edd9f3294ba0..1e9985eaf8338a 100644 --- a/src/app/CommandSender.h +++ b/src/app/CommandSender.h @@ -59,7 +59,7 @@ class CommandSender final : public Messaging::ExchangeDelegate * * See Abort() for details on when that might occur. */ - virtual ~CommandSender() { Abort(); } + ~CommandSender() override { Abort(); } /** * Gets the inner exchange context object, without ownership. diff --git a/src/app/EventManagement.h b/src/app/EventManagement.h index 07b900ca0f375c..68d29cc66404df 100644 --- a/src/app/EventManagement.h +++ b/src/app/EventManagement.h @@ -100,7 +100,7 @@ class CircularEventBuffer : public TLV::CHIPCircularTLVBuffer void SetRequiredSpaceforEvicted(size_t aRequiredSpace) { mRequiredSpaceForEvicted = aRequiredSpace; } size_t GetRequiredSpaceforEvicted() { return mRequiredSpaceForEvicted; } - virtual ~CircularEventBuffer() = default; + ~CircularEventBuffer() override = default; private: CircularEventBuffer * mpPrev = nullptr; ///< A pointer CircularEventBuffer storing events less important events diff --git a/src/app/OperationalDeviceProxy.h b/src/app/OperationalDeviceProxy.h index 3083fc68408f9f..c976bde994b525 100644 --- a/src/app/OperationalDeviceProxy.h +++ b/src/app/OperationalDeviceProxy.h @@ -88,7 +88,7 @@ class DLL_EXPORT OperationalDeviceProxy : public DeviceProxy, public AddressResolve::NodeListener { public: - virtual ~OperationalDeviceProxy(); + ~OperationalDeviceProxy() override; OperationalDeviceProxy(DeviceProxyInitParams & params, PeerId peerId) : mSecureSession(*this) { VerifyOrReturn(params.Validate() == CHIP_NO_ERROR); diff --git a/src/app/OperationalDeviceProxyPool.h b/src/app/OperationalDeviceProxyPool.h index cb93c29aebd40d..194c325bf426a4 100644 --- a/src/app/OperationalDeviceProxyPool.h +++ b/src/app/OperationalDeviceProxyPool.h @@ -48,7 +48,7 @@ template class OperationalDeviceProxyPool : public OperationalDeviceProxyPoolDelegate { public: - ~OperationalDeviceProxyPool() { mDevicePool.ReleaseAll(); } + ~OperationalDeviceProxyPool() override { mDevicePool.ReleaseAll(); } OperationalDeviceProxy * Allocate(DeviceProxyInitParams & params, PeerId peerId) override { diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index c8f30f359c5350..942d52cb3bd70a 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -202,7 +202,7 @@ class ReadClient : public Messaging::ExchangeDelegate * * OnDone() will not be called. */ - virtual ~ReadClient(); + ~ReadClient() override; /* * This forcibly closes the exchange context if a valid one is pointed to. Such a situation does diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index 9b7d84fb965e27..e5c4d7e83b2dff 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -98,7 +98,7 @@ class ReadHandler : public Messaging::ExchangeDelegate * * See Abort() for details on when that might occur. */ - ~ReadHandler(); + ~ReadHandler() override; /** * Process a read/subscribe request. Parts of the processing may end up being asynchronous, but the ReadHandler diff --git a/src/app/TimedHandler.h b/src/app/TimedHandler.h index da0f06bd0a0eac..47faa9d5940946 100644 --- a/src/app/TimedHandler.h +++ b/src/app/TimedHandler.h @@ -51,7 +51,7 @@ class TimedHandler : public Messaging::ExchangeDelegate { public: TimedHandler() {} - virtual ~TimedHandler() {} + ~TimedHandler() override {} // ExchangeDelegate implementation. CHIP_ERROR OnMessageReceived(Messaging::ExchangeContext * aExchangeContext, const PayloadHeader & aPayloadHeader, diff --git a/src/app/WriteClient.h b/src/app/WriteClient.h index eec72a5f12f0ab..0fd3e8466e1590 100644 --- a/src/app/WriteClient.h +++ b/src/app/WriteClient.h @@ -232,7 +232,7 @@ class WriteClient : public Messaging::ExchangeDelegate * * See Abort() for details on when that might occur. */ - virtual ~WriteClient() { Abort(); } + ~WriteClient() override { Abort(); } private: friend class TestWriteInteraction; diff --git a/src/app/WriteHandler.h b/src/app/WriteHandler.h index b38108baf64c78..6b820282cecf79 100644 --- a/src/app/WriteHandler.h +++ b/src/app/WriteHandler.h @@ -76,7 +76,7 @@ class WriteHandler : public Messaging::ExchangeDelegate bool IsFree() const { return mState == State::Uninitialized; } - virtual ~WriteHandler() = default; + ~WriteHandler() override = default; CHIP_ERROR ProcessAttributeDataIBs(TLV::TLVReader & aAttributeDataIBsReader); CHIP_ERROR ProcessGroupAttributeDataIBs(TLV::TLVReader & aAttributeDataIBsReader); diff --git a/src/app/tests/suites/commands/commissioner/CommissionerCommands.h b/src/app/tests/suites/commands/commissioner/CommissionerCommands.h index 90e9d021672870..bd622c9a10ba31 100644 --- a/src/app/tests/suites/commands/commissioner/CommissionerCommands.h +++ b/src/app/tests/suites/commands/commissioner/CommissionerCommands.h @@ -25,7 +25,7 @@ class CommissionerCommands : public chip::Controller::DevicePairingDelegate { public: CommissionerCommands(){}; - virtual ~CommissionerCommands(){}; + ~CommissionerCommands() override{}; virtual CHIP_ERROR ContinueOnChipMainThread(CHIP_ERROR err) = 0; virtual chip::Controller::DeviceCommissioner & GetCurrentCommissioner() = 0; diff --git a/src/app/tests/suites/commands/discovery/DiscoveryCommands.h b/src/app/tests/suites/commands/discovery/DiscoveryCommands.h index 729136e2093bff..b0123e5476e04b 100644 --- a/src/app/tests/suites/commands/discovery/DiscoveryCommands.h +++ b/src/app/tests/suites/commands/discovery/DiscoveryCommands.h @@ -47,7 +47,7 @@ class DiscoveryCommands : public chip::Dnssd::CommissioningResolveDelegate, publ { public: DiscoveryCommands(){}; - virtual ~DiscoveryCommands(){}; + ~DiscoveryCommands() override{}; virtual CHIP_ERROR ContinueOnChipMainThread(CHIP_ERROR err) = 0; diff --git a/src/controller/AbstractDnssdDiscoveryController.h b/src/controller/AbstractDnssdDiscoveryController.h index 66eab16ff7139d..3372aab1f67bf8 100644 --- a/src/controller/AbstractDnssdDiscoveryController.h +++ b/src/controller/AbstractDnssdDiscoveryController.h @@ -40,7 +40,7 @@ class DLL_EXPORT AbstractDnssdDiscoveryController : public Dnssd::CommissioningR { public: AbstractDnssdDiscoveryController() {} - virtual ~AbstractDnssdDiscoveryController() {} + ~AbstractDnssdDiscoveryController() override {} void OnNodeDiscovered(const chip::Dnssd::DiscoveredNodeData & nodeData) override; diff --git a/src/controller/AutoCommissioner.h b/src/controller/AutoCommissioner.h index 15a765fa17adf6..5c2438fc28ee33 100644 --- a/src/controller/AutoCommissioner.h +++ b/src/controller/AutoCommissioner.h @@ -29,13 +29,13 @@ class AutoCommissioner : public CommissioningDelegate { public: AutoCommissioner(); - virtual ~AutoCommissioner(); + ~AutoCommissioner() override; CHIP_ERROR SetCommissioningParameters(const CommissioningParameters & params) override; void SetOperationalCredentialsDelegate(OperationalCredentialsDelegate * operationalCredentialsDelegate) override; - virtual CHIP_ERROR StartCommissioning(DeviceCommissioner * commissioner, CommissioneeDeviceProxy * proxy) override; + CHIP_ERROR StartCommissioning(DeviceCommissioner * commissioner, CommissioneeDeviceProxy * proxy) override; - virtual CHIP_ERROR CommissioningStepFinished(CHIP_ERROR err, CommissioningDelegate::CommissioningReport report) override; + CHIP_ERROR CommissioningStepFinished(CHIP_ERROR err, CommissioningDelegate::CommissioningReport report) override; private: CommissioningStage GetNextCommissioningStage(CommissioningStage currentStage, CHIP_ERROR & lastErr); diff --git a/src/controller/CHIPCommissionableNodeController.h b/src/controller/CHIPCommissionableNodeController.h index cc381fccb0b583..53b77776d72abf 100644 --- a/src/controller/CHIPCommissionableNodeController.h +++ b/src/controller/CHIPCommissionableNodeController.h @@ -37,7 +37,7 @@ class DLL_EXPORT CommissionableNodeController : public AbstractDnssdDiscoveryCon { public: CommissionableNodeController(chip::Dnssd::Resolver * resolver = nullptr) : mResolver(resolver) {} - virtual ~CommissionableNodeController() {} + ~CommissionableNodeController() override {} CHIP_ERROR DiscoverCommissioners(Dnssd::DiscoveryFilter discoveryFilter = Dnssd::DiscoveryFilter()); diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index fccaa090af7a08..72ed6f2416a432 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -172,7 +172,7 @@ class DLL_EXPORT DeviceController : public SessionRecoveryDelegate, public Abstr { public: DeviceController(); - virtual ~DeviceController() {} + ~DeviceController() override {} enum class CommissioningWindowOption : uint8_t { @@ -436,7 +436,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, { public: DeviceCommissioner(); - ~DeviceCommissioner() {} + ~DeviceCommissioner() override {} #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY // make this commissioner discoverable /** diff --git a/src/controller/CommissioneeDeviceProxy.h b/src/controller/CommissioneeDeviceProxy.h index a40a38eff91733..6d053ffec9b9d2 100644 --- a/src/controller/CommissioneeDeviceProxy.h +++ b/src/controller/CommissioneeDeviceProxy.h @@ -79,7 +79,7 @@ struct ControllerDeviceInitParams class CommissioneeDeviceProxy : public DeviceProxy, public SessionReleaseDelegate { public: - ~CommissioneeDeviceProxy(); + ~CommissioneeDeviceProxy() override; CommissioneeDeviceProxy() : mSecureSession(*this) {} CommissioneeDeviceProxy(const CommissioneeDeviceProxy &) = delete; diff --git a/src/controller/CommissionerDiscoveryController.h b/src/controller/CommissionerDiscoveryController.h index aff599dd663034..143c16465b1638 100644 --- a/src/controller/CommissionerDiscoveryController.h +++ b/src/controller/CommissionerDiscoveryController.h @@ -183,7 +183,7 @@ class CommissionerDiscoveryController : public chip::Protocols::UserDirectedComm * * This code will call the registered UserPrompter's PromptForCommissionOKPermission */ - void OnUserDirectedCommissioningRequest(UDCClientState state); + void OnUserDirectedCommissioningRequest(UDCClientState state) override; /** * This method should be called after the user has given consent for commissioning of the client diff --git a/src/controller/ExampleOperationalCredentialsIssuer.h b/src/controller/ExampleOperationalCredentialsIssuer.h index 98a04ae6defe61..96023a4945dc5a 100644 --- a/src/controller/ExampleOperationalCredentialsIssuer.h +++ b/src/controller/ExampleOperationalCredentialsIssuer.h @@ -52,7 +52,7 @@ class DLL_EXPORT ExampleOperationalCredentialsIssuer : public OperationalCredent // It is recommended that this index track the fabric index within which this issuer is operating. // ExampleOperationalCredentialsIssuer(uint32_t index = 0) { mIndex = index; } - virtual ~ExampleOperationalCredentialsIssuer() {} + ~ExampleOperationalCredentialsIssuer() override {} CHIP_ERROR GenerateNOCChain(const ByteSpan & csrElements, const ByteSpan & attestationSignature, const ByteSpan & DAC, const ByteSpan & PAI, const ByteSpan & PAA, diff --git a/src/credentials/GroupDataProviderImpl.h b/src/credentials/GroupDataProviderImpl.h index acb89dee4ff0be..e9717149367bdd 100644 --- a/src/credentials/GroupDataProviderImpl.h +++ b/src/credentials/GroupDataProviderImpl.h @@ -32,7 +32,7 @@ class GroupDataProviderImpl : public GroupDataProvider GroupDataProviderImpl(uint16_t maxGroupsPerFabric, uint16_t maxGroupKeysPerFabric) : GroupDataProvider(maxGroupsPerFabric, maxGroupKeysPerFabric) {} - virtual ~GroupDataProviderImpl() {} + ~GroupDataProviderImpl() override {} /** * @brief Set the storage implementation used for non-volatile storage of configuration data. diff --git a/src/crypto/CHIPCryptoPAL.h b/src/crypto/CHIPCryptoPAL.h index c21384b4e49fe1..056743b682fdaa 100644 --- a/src/crypto/CHIPCryptoPAL.h +++ b/src/crypto/CHIPCryptoPAL.h @@ -362,7 +362,7 @@ class P256Keypair : public P256KeypairBase { public: P256Keypair() {} - virtual ~P256Keypair(); + ~P256Keypair() override; /** * @brief Initialize the keypair. diff --git a/src/include/platform/NetworkCommissioning.h b/src/include/platform/NetworkCommissioning.h index dc16a5ed99f783..7661216e0612c6 100644 --- a/src/include/platform/NetworkCommissioning.h +++ b/src/include/platform/NetworkCommissioning.h @@ -272,7 +272,7 @@ class WiFiDriver : public Internal::WirelessDriver */ virtual void ScanNetworks(ByteSpan ssid, ScanCallback * callback) = 0; - virtual ~WiFiDriver() = default; + ~WiFiDriver() override = default; }; class ThreadDriver : public Internal::WirelessDriver @@ -302,7 +302,7 @@ class ThreadDriver : public Internal::WirelessDriver */ virtual void ScanNetworks(ScanCallback * callback) = 0; - virtual ~ThreadDriver() = default; + ~ThreadDriver() override = default; }; class EthernetDriver : public Internal::BaseDriver diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.h b/src/include/platform/internal/GenericConfigurationManagerImpl.h index 550f0579c106d1..9cc4f523049483 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.h +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.h @@ -126,7 +126,7 @@ class GenericConfigurationManagerImpl : public ConfigurationManager #endif void LogDeviceConfig() override; - virtual ~GenericConfigurationManagerImpl() = default; + ~GenericConfigurationManagerImpl() override = default; protected: #if CHIP_ENABLE_ROTATING_DEVICE_ID && defined(CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID) diff --git a/src/inet/InetLayer.h b/src/inet/InetLayer.h index 9cd28eb3f2d052..8a075e3bcbd3dd 100644 --- a/src/inet/InetLayer.h +++ b/src/inet/InetLayer.h @@ -117,8 +117,8 @@ class EndPointManagerImplPool : public EndPointManager; using EndPoint = typename EndPointImpl::EndPoint; - EndPointManagerImplPool() = default; - ~EndPointManagerImplPool() = default; + EndPointManagerImplPool() = default; + ~EndPointManagerImplPool() override = default; EndPoint * CreateEndPoint() override { return sEndPointPool.CreateObject(*this); } void ReleaseEndPoint(EndPoint * endPoint) override { sEndPointPool.ReleaseObject(static_cast(endPoint)); } diff --git a/src/lib/address_resolve/AddressResolve_DefaultImpl.h b/src/lib/address_resolve/AddressResolve_DefaultImpl.h index ab234b88ecad69..c05bdfc7f93f62 100644 --- a/src/lib/address_resolve/AddressResolve_DefaultImpl.h +++ b/src/lib/address_resolve/AddressResolve_DefaultImpl.h @@ -129,7 +129,7 @@ class NodeLookupHandle : public NodeLookupHandleBase class Resolver : public ::chip::AddressResolve::Resolver, public Dnssd::OperationalResolveDelegate { public: - virtual ~Resolver() = default; + ~Resolver() override = default; // AddressResolve::Resolver diff --git a/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp b/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp index ee842dc6a577c0..3ff275395cf5dd 100644 --- a/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp +++ b/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp @@ -113,7 +113,7 @@ class AdvertiserMinMdns : public ServiceAdvertiser, mResponseSender.AddQueryResponder(mQueryResponderAllocatorCommissionable.GetQueryResponder()); mResponseSender.AddQueryResponder(mQueryResponderAllocatorCommissioner.GetQueryResponder()); } - ~AdvertiserMinMdns() {} + ~AdvertiserMinMdns() override {} // Service advertiser CHIP_ERROR Init(chip::Inet::EndPointManager * udpEndPointManager) override; diff --git a/src/lib/dnssd/minimal_mdns/Server.h b/src/lib/dnssd/minimal_mdns/Server.h index 46c1ae8c5c606c..0266b4625ebfb3 100644 --- a/src/lib/dnssd/minimal_mdns/Server.h +++ b/src/lib/dnssd/minimal_mdns/Server.h @@ -234,7 +234,7 @@ class Server : private chip::PoolImpl(this)) {} - ~Server() {} + ~Server() override {} }; } // namespace Minimal diff --git a/src/lib/dnssd/minimal_mdns/responders/QueryResponder.h b/src/lib/dnssd/minimal_mdns/responders/QueryResponder.h index 4ff359490ee19e..c2f55096606f95 100644 --- a/src/lib/dnssd/minimal_mdns/responders/QueryResponder.h +++ b/src/lib/dnssd/minimal_mdns/responders/QueryResponder.h @@ -239,7 +239,7 @@ class QueryResponderBase : public Responder // "_services._dns-sd._udp.local" public: /// Builds a new responder with the given storage for the response infos QueryResponderBase(Internal::QueryResponderInfo * infos, size_t infoSizes); - virtual ~QueryResponderBase() {} + ~QueryResponderBase() override {} /// Setup initial settings (clears all infos and sets up dns-sd query replies) void Init(); diff --git a/src/lib/support/PoolWrapper.h b/src/lib/support/PoolWrapper.h index e5025640179cf6..78b6d838245633 100644 --- a/src/lib/support/PoolWrapper.h +++ b/src/lib/support/PoolWrapper.h @@ -74,27 +74,26 @@ class PoolProxy> : public PoolIn static_assert(std::is_base_of::value, "Interface type is not derived from Pool type"); PoolProxy() {} - virtual ~PoolProxy() override {} + ~PoolProxy() override {} - virtual U * CreateObject(ConstructorArguments... args) override { return Impl().CreateObject(std::move(args)...); } + U * CreateObject(ConstructorArguments... args) override { return Impl().CreateObject(std::move(args)...); } - virtual void ReleaseObject(U * element) override { Impl().ReleaseObject(static_cast(element)); } + void ReleaseObject(U * element) override { Impl().ReleaseObject(static_cast(element)); } - virtual void ReleaseAll() override { Impl().ReleaseAll(); } + void ReleaseAll() override { Impl().ReleaseAll(); } - virtual void ResetObject(U * element, ConstructorArguments... args) override + void ResetObject(U * element, ConstructorArguments... args) override { return Impl().ResetObject(static_cast(element), std::move(args)...); } protected: - virtual Loop ForEachActiveObjectInner(void * context, - typename PoolInterface::Lambda lambda) override + Loop ForEachActiveObjectInner(void * context, typename PoolInterface::Lambda lambda) override { return Impl().ForEachActiveObject([&](T * target) { return lambda(context, static_cast(target)); }); } - virtual Loop ForEachActiveObjectInner(void * context, - typename PoolInterface::LambdaConst lambda) const override + Loop ForEachActiveObjectInner(void * context, + typename PoolInterface::LambdaConst lambda) const override { return Impl().ForEachActiveObject([&](const T * target) { return lambda(context, static_cast(target)); }); } @@ -120,11 +119,11 @@ class PoolImpl : public PoolProxy... { public: PoolImpl() {} - virtual ~PoolImpl() override {} + ~PoolImpl() override {} protected: - virtual ObjectPool & Impl() override { return mImpl; } - virtual const ObjectPool & Impl() const override { return mImpl; } + ObjectPool & Impl() override { return mImpl; } + const ObjectPool & Impl() const override { return mImpl; } private: ObjectPool mImpl; diff --git a/src/messaging/ApplicationExchangeDispatch.h b/src/messaging/ApplicationExchangeDispatch.h index d1fb76aa019ec6..6316df05f1b44f 100644 --- a/src/messaging/ApplicationExchangeDispatch.h +++ b/src/messaging/ApplicationExchangeDispatch.h @@ -40,7 +40,7 @@ class ApplicationExchangeDispatch : public ExchangeMessageDispatch } ApplicationExchangeDispatch() {} - virtual ~ApplicationExchangeDispatch() {} + ~ApplicationExchangeDispatch() override {} protected: bool MessagePermitted(uint16_t protocol, uint8_t type) override; diff --git a/src/messaging/ExchangeContext.h b/src/messaging/ExchangeContext.h index 1798ce2a8638b5..4e616194584037 100644 --- a/src/messaging/ExchangeContext.h +++ b/src/messaging/ExchangeContext.h @@ -68,7 +68,7 @@ class DLL_EXPORT ExchangeContext : public ReliableMessageContext, ExchangeContext(ExchangeManager * em, uint16_t ExchangeId, const SessionHandle & session, bool Initiator, ExchangeDelegate * delegate); - ~ExchangeContext(); + ~ExchangeContext() override; /** * Determine whether the context is the initiator of the exchange. diff --git a/src/platform/Linux/NetworkCommissioningDriver.h b/src/platform/Linux/NetworkCommissioningDriver.h index 19431e5010e96e..948de0e19ce64a 100644 --- a/src/platform/Linux/NetworkCommissioningDriver.h +++ b/src/platform/Linux/NetworkCommissioningDriver.h @@ -62,7 +62,7 @@ class LinuxWiFiDriver final : public WiFiDriver size_t Count() override; bool Next(Network & item) override; void Release() override { delete this; } - ~WiFiNetworkIterator() = default; + ~WiFiNetworkIterator() override = default; private: LinuxWiFiDriver * driver; @@ -119,7 +119,7 @@ class LinuxThreadDriver final : public ThreadDriver size_t Count() override; bool Next(Network & item) override; void Release() override { delete this; } - ~ThreadNetworkIterator() = default; + ~ThreadNetworkIterator() override = default; private: LinuxThreadDriver * driver; diff --git a/src/protocols/bdx/TransferFacilitator.h b/src/protocols/bdx/TransferFacilitator.h index 40f606d3524881..bc02e871ac1d41 100644 --- a/src/protocols/bdx/TransferFacilitator.h +++ b/src/protocols/bdx/TransferFacilitator.h @@ -45,7 +45,7 @@ class TransferFacilitator : public Messaging::ExchangeDelegate { public: TransferFacilitator() : mExchangeCtx(nullptr), mSystemLayer(nullptr), mPollFreq(kDefaultPollFreq) {} - ~TransferFacilitator() = default; + ~TransferFacilitator() override = default; private: // Inherited from ExchangeContext diff --git a/src/protocols/secure_channel/CASEServer.h b/src/protocols/secure_channel/CASEServer.h index 256c0fc04fa58c..81597fbb3e5f59 100644 --- a/src/protocols/secure_channel/CASEServer.h +++ b/src/protocols/secure_channel/CASEServer.h @@ -29,7 +29,7 @@ class CASEServer : public SessionEstablishmentDelegate, public Messaging::Exchan { public: CASEServer() {} - ~CASEServer() + ~CASEServer() override { if (mExchangeManager != nullptr) { diff --git a/src/protocols/secure_channel/CASESession.h b/src/protocols/secure_channel/CASESession.h index 6c8c35e3ed8d55..d5e8aed5edfde9 100644 --- a/src/protocols/secure_channel/CASESession.h +++ b/src/protocols/secure_channel/CASESession.h @@ -76,7 +76,7 @@ class DLL_EXPORT CASESession : public Messaging::ExchangeDelegate, public Pairin CASESession(CASESession &&) = default; CASESession(const CASESession &) = default; - virtual ~CASESession(); + ~CASESession() override; /** * @brief @@ -142,7 +142,7 @@ class DLL_EXPORT CASESession : public Messaging::ExchangeDelegate, public Pairin * @param role Role of the new session (initiator or responder) * @return CHIP_ERROR The result of session derivation */ - virtual CHIP_ERROR DeriveSecureSession(CryptoContext & session, CryptoContext::SessionRole role) override; + CHIP_ERROR DeriveSecureSession(CryptoContext & session, CryptoContext::SessionRole role) override; /** * @brief Serialize the CASESession to the given cachableSession data structure for secure pairing diff --git a/src/protocols/secure_channel/PASESession.h b/src/protocols/secure_channel/PASESession.h index 98bbc6c2d72914..a6f9b687c6566a 100644 --- a/src/protocols/secure_channel/PASESession.h +++ b/src/protocols/secure_channel/PASESession.h @@ -73,7 +73,7 @@ class DLL_EXPORT PASESession : public Messaging::ExchangeDelegate, public Pairin PASESession(PASESession &&) = default; PASESession(const PASESession &) = delete; - virtual ~PASESession(); + ~PASESession() override; // TODO: The SetPeerNodeId method should not be exposed; PASE sessions // should not need to be told their peer node ID diff --git a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h index 60a3397033d716..9cb75a596ff6a4 100644 --- a/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h +++ b/src/protocols/secure_channel/SessionEstablishmentExchangeDispatch.h @@ -38,7 +38,7 @@ class SessionEstablishmentExchangeDispatch : public Messaging::ExchangeMessageDi } SessionEstablishmentExchangeDispatch() {} - virtual ~SessionEstablishmentExchangeDispatch() {} + ~SessionEstablishmentExchangeDispatch() override {} protected: bool MessagePermitted(uint16_t protocol, uint8_t type) override; diff --git a/src/system/SystemClock.h b/src/system/SystemClock.h index 6202ea8b6861af..dfc54e8a12f0e9 100644 --- a/src/system/SystemClock.h +++ b/src/system/SystemClock.h @@ -285,7 +285,7 @@ class ClockBase class ClockImpl : public ClockBase { public: - ~ClockImpl() = default; + ~ClockImpl() override = default; Microseconds64 GetMonotonicMicroseconds64() override; Milliseconds64 GetMonotonicMilliseconds64() override; CHIP_ERROR GetClock_RealTime(Microseconds64 & aCurTime) override; diff --git a/src/system/SystemLayerImplSelect.h b/src/system/SystemLayerImplSelect.h index d714f7929067a5..5a631470f3e9e5 100644 --- a/src/system/SystemLayerImplSelect.h +++ b/src/system/SystemLayerImplSelect.h @@ -41,7 +41,7 @@ class LayerImplSelect : public LayerSocketsLoop { public: LayerImplSelect() = default; - ~LayerImplSelect() { VerifyOrDie(mLayerState.Destroy()); } + ~LayerImplSelect() override { VerifyOrDie(mLayerState.Destroy()); } // Layer overrides. CHIP_ERROR Init() override; diff --git a/src/system/TLVPacketBufferBackingStore.h b/src/system/TLVPacketBufferBackingStore.h index 512d4a20e996f4..bbdb85e89df894 100644 --- a/src/system/TLVPacketBufferBackingStore.h +++ b/src/system/TLVPacketBufferBackingStore.h @@ -42,7 +42,7 @@ class TLVPacketBufferBackingStore : public chip::TLV::TLVBackingStore { Init(std::move(buffer), useChainedBuffers); } - virtual ~TLVPacketBufferBackingStore() {} + ~TLVPacketBufferBackingStore() override {} /** * Take ownership of a backing packet buffer. diff --git a/src/transport/GroupSession.h b/src/transport/GroupSession.h index 969050436c4899..484d46ca4c27ff 100644 --- a/src/transport/GroupSession.h +++ b/src/transport/GroupSession.h @@ -48,7 +48,7 @@ class IncomingGroupSession : public Session { SetFabricIndex(fabricIndex); } - ~IncomingGroupSession() + ~IncomingGroupSession() override { NotifySessionReleased(); #ifndef NDEBUG @@ -113,7 +113,7 @@ class OutgoingGroupSession : public Session { SetFabricIndex(fabricIndex); } - ~OutgoingGroupSession() + ~OutgoingGroupSession() override { NotifySessionReleased(); #ifndef NDEBUG diff --git a/src/transport/SecureSession.h b/src/transport/SecureSession.h index 04094961ae6c6e..e77fab01eb7fbf 100644 --- a/src/transport/SecureSession.h +++ b/src/transport/SecureSession.h @@ -71,7 +71,7 @@ class SecureSession : public Session { SetFabricIndex(fabric); } - ~SecureSession() { NotifySessionReleased(); } + ~SecureSession() override { NotifySessionReleased(); } SecureSession(SecureSession &&) = delete; SecureSession(const SecureSession &) = delete; diff --git a/src/transport/SessionHolder.h b/src/transport/SessionHolder.h index 897004f59f6dcc..ded017e210da9f 100644 --- a/src/transport/SessionHolder.h +++ b/src/transport/SessionHolder.h @@ -32,7 +32,7 @@ class SessionHolder : public SessionReleaseDelegate, public IntrusiveListNodeBas { public: SessionHolder() {} - ~SessionHolder(); + ~SessionHolder() override; SessionHolder(const SessionHolder &); SessionHolder(SessionHolder && that); diff --git a/src/transport/UnauthenticatedSessionTable.h b/src/transport/UnauthenticatedSessionTable.h index 4ed209e066cd84..68c8afc66a72eb 100644 --- a/src/transport/UnauthenticatedSessionTable.h +++ b/src/transport/UnauthenticatedSessionTable.h @@ -56,7 +56,7 @@ class UnauthenticatedSession : public Session, public ReferenceCounted