From 2145882899a2dfac15f925b1ab2d21cd36931be7 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 16 Mar 2023 22:24:53 +0000 Subject: [PATCH] Restyled by clang-format --- src/app/server/Server.h | 94 +++++--------------- src/app/util/mock/attribute-storage.cpp | 20 ++--- src/lib/support/DefaultStorageKeyAllocator.h | 2 +- 3 files changed, 31 insertions(+), 85 deletions(-) diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 8a0b872cd36ec9..45bcf0a7290515 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -89,7 +89,7 @@ struct ServerInitParams ServerInitParams() = default; // Not copyable - ServerInitParams(const ServerInitParams &) = delete; + ServerInitParams(const ServerInitParams &) = delete; ServerInitParams & operator=(const ServerInitParams &) = delete; // Application delegate to handle some commissioning lifecycle events @@ -205,7 +205,7 @@ struct CommonCaseDeviceServerInitParams : public ServerInitParams CommonCaseDeviceServerInitParams() = default; // Not copyable - CommonCaseDeviceServerInitParams(const CommonCaseDeviceServerInitParams &) = delete; + CommonCaseDeviceServerInitParams(const CommonCaseDeviceServerInitParams &) = delete; CommonCaseDeviceServerInitParams & operator=(const CommonCaseDeviceServerInitParams &) = delete; /** @@ -333,92 +333,41 @@ class Server */ void RejoinExistingMulticastGroups(); - FabricTable & GetFabricTable() - { - return mFabrics; - } + FabricTable & GetFabricTable() { return mFabrics; } - CASESessionManager * GetCASESessionManager() - { - return &mCASESessionManager; - } + CASESessionManager * GetCASESessionManager() { return &mCASESessionManager; } - Messaging::ExchangeManager & GetExchangeManager() - { - return mExchangeMgr; - } + Messaging::ExchangeManager & GetExchangeManager() { return mExchangeMgr; } - SessionManager & GetSecureSessionManager() - { - return mSessions; - } + SessionManager & GetSecureSessionManager() { return mSessions; } - SessionResumptionStorage * GetSessionResumptionStorage() - { - return mSessionResumptionStorage; - } + SessionResumptionStorage * GetSessionResumptionStorage() { return mSessionResumptionStorage; } - app::SubscriptionResumptionStorage * GetSubscriptionResumptionStorage() - { - return mSubscriptionResumptionStorage; - } + app::SubscriptionResumptionStorage * GetSubscriptionResumptionStorage() { return mSubscriptionResumptionStorage; } - TransportMgrBase & GetTransportManager() - { - return mTransports; - } + TransportMgrBase & GetTransportManager() { return mTransports; } - Credentials::GroupDataProvider * GetGroupDataProvider() - { - return mGroupsProvider; - } + Credentials::GroupDataProvider * GetGroupDataProvider() { return mGroupsProvider; } - Crypto::SessionKeystore * GetSessionKeystore() const - { - return mSessionKeystore; - } + Crypto::SessionKeystore * GetSessionKeystore() const { return mSessionKeystore; } #if CONFIG_NETWORK_LAYER_BLE - Ble::BleLayer * GetBleLayerObject() - { - return mBleLayer; - } + Ble::BleLayer * GetBleLayerObject() { return mBleLayer; } #endif - CommissioningWindowManager & GetCommissioningWindowManager() - { - return mCommissioningWindowManager; - } + CommissioningWindowManager & GetCommissioningWindowManager() { return mCommissioningWindowManager; } - PersistentStorageDelegate & GetPersistentStorage() - { - return *mDeviceStorage; - } + PersistentStorageDelegate & GetPersistentStorage() { return *mDeviceStorage; } - app::FailSafeContext & GetFailSafeContext() - { - return mFailSafeContext; - } + app::FailSafeContext & GetFailSafeContext() { return mFailSafeContext; } - TestEventTriggerDelegate * GetTestEventTriggerDelegate() - { - return mTestEventTriggerDelegate; - } + TestEventTriggerDelegate * GetTestEventTriggerDelegate() { return mTestEventTriggerDelegate; } - Crypto::OperationalKeystore * GetOperationalKeystore() - { - return mOperationalKeystore; - } + Crypto::OperationalKeystore * GetOperationalKeystore() { return mOperationalKeystore; } - Credentials::OperationalCertificateStore * GetOpCertStore() - { - return mOpCertStore; - } + Credentials::OperationalCertificateStore * GetOpCertStore() { return mOpCertStore; } - app::DefaultAttributePersistenceProvider & GetDefaultAttributePersister() - { - return mAttributePersister; - } + app::DefaultAttributePersistenceProvider & GetDefaultAttributePersister() { return mAttributePersister; } /** * This function causes the ShutDown event to be generated async on the @@ -435,10 +384,7 @@ class Server return System::SystemClock().GetMonotonicMicroseconds64() - mInitTimestamp; } - static Server & GetInstance() - { - return sServer; - } + static Server & GetInstance() { return sServer; } private: Server() = default; diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index 95e12dad065da5..4e760b8c01c6d5 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -61,11 +61,11 @@ EndpointId endpoints[] = { kMockEndpoint1, kMockEndpoint2, kMockEndpoint3 }; uint16_t clusterIndex[] = { 0, 2, 5 }; uint8_t clusterCount[] = { 2, 3, 4 }; ClusterId clusters[] = { MockClusterId(1), MockClusterId(2), MockClusterId(1), MockClusterId(2), MockClusterId(3), - MockClusterId(1), MockClusterId(2), MockClusterId(3), MockClusterId(4) }; + MockClusterId(1), MockClusterId(2), MockClusterId(3), MockClusterId(4) }; uint16_t attributeIndex[] = { 0, 2, 5, 7, 11, 16, 19, 25, 27 }; uint16_t attributeCount[] = { 2, 3, 2, 4, 5, 3, 6, 2, 2 }; AttributeId attributes[] = { - // clang-format off + // clang-format off Clusters::Globals::Attributes::ClusterRevision::Id, Clusters::Globals::Attributes::FeatureMap::Id, Clusters::Globals::Attributes::ClusterRevision::Id, Clusters::Globals::Attributes::FeatureMap::Id, MockAttributeId(1), Clusters::Globals::Attributes::ClusterRevision::Id, Clusters::Globals::Attributes::FeatureMap::Id, @@ -84,14 +84,14 @@ bool mockAttribute1 = true; int16_t mockAttribute2 = 42; uint64_t mockAttribute3 = 0xdeadbeef0000cafe; uint8_t mockAttribute4[256] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, - 0, 1, 2, 3, 4, 5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4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, }; } // namespace diff --git a/src/lib/support/DefaultStorageKeyAllocator.h b/src/lib/support/DefaultStorageKeyAllocator.h index 84dcb15379e6ef..6be4b307eda680 100644 --- a/src/lib/support/DefaultStorageKeyAllocator.h +++ b/src/lib/support/DefaultStorageKeyAllocator.h @@ -33,7 +33,7 @@ namespace chip { class StorageKeyName { public: - StorageKeyName(const StorageKeyName & other) = default; + StorageKeyName(const StorageKeyName & other) = default; StorageKeyName & operator=(const StorageKeyName & other) = default; ~StorageKeyName() { memset(mKeyNameBuffer, 0, sizeof(mKeyNameBuffer)); }