From 1b33b69a2bffed406822469b0a5e94b19ea38680 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Mon, 8 Jul 2024 17:31:58 +0000 Subject: [PATCH] Restyled by clang-format --- examples/tv-app/android/java/AppImpl.cpp | 14 +++++++++----- examples/tv-app/tv-common/src/AppTv.cpp | 12 +++++++----- src/app/app-platform/ContentAppPlatform.cpp | 13 ++++++++----- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/examples/tv-app/android/java/AppImpl.cpp b/examples/tv-app/android/java/AppImpl.cpp index 969bc4adfb205d..c24e7e537dbb23 100644 --- a/examples/tv-app/android/java/AppImpl.cpp +++ b/examples/tv-app/android/java/AppImpl.cpp @@ -381,7 +381,8 @@ class DevicePairedCommand : public Controller::DevicePairingDelegate if (pairingCommand) { ChipLogProgress(DeviceLayer, - "OnDeviceConnectedFn - Updating ACL for node id: " ChipLogFormatX64 " and vendor id: %d and product id: %d", + "OnDeviceConnectedFn - Updating ACL for node id: " ChipLogFormatX64 + " and vendor id: %d and product id: %d", ChipLogValueX64(cbContext->nodeId), cbContext->vendorId, cbContext->productId); GetCommissionerDiscoveryController()->CommissioningSucceeded(cbContext->vendorId, cbContext->productId, @@ -397,7 +398,8 @@ class DevicePairedCommand : public Controller::DevicePairingDelegate if (pairingCommand) { ChipLogProgress(DeviceLayer, - "OnDeviceConnectionFailureFn - Not updating ACL for node id: " ChipLogFormatX64 " and vendor id: %d and product id: %d", + "OnDeviceConnectionFailureFn - Not updating ACL for node id: " ChipLogFormatX64 + " and vendor id: %d and product id: %d", ChipLogValueX64(cbContext->nodeId), cbContext->vendorId, cbContext->productId); // TODO: Remove Node Id } @@ -408,7 +410,8 @@ class DevicePairedCommand : public Controller::DevicePairingDelegate std::shared_ptr mContext; }; -void refreshConnectedClientsAcl(uint16_t vendorId, uint16_t productId, ContentAppImpl * app) { +void refreshConnectedClientsAcl(uint16_t vendorId, uint16_t productId, ContentAppImpl * app) +{ std::set nodeIds = ContentAppPlatform::GetInstance().GetNodeIdsForContentApp(vendorId, productId); @@ -422,8 +425,9 @@ void refreshConnectedClientsAcl(uint16_t vendorId, uint16_t productId, ContentAp for (const auto & nodeId : nodeIds) { - ChipLogProgress(DeviceLayer, "Creating Pairing Command with node id: " ChipLogFormatX64 " and vendor id: %d and product id: %d", ChipLogValueX64(nodeId), - vendorId, productId); + ChipLogProgress(DeviceLayer, + "Creating Pairing Command with node id: " ChipLogFormatX64 " and vendor id: %d and product id: %d", + ChipLogValueX64(nodeId), vendorId, productId); std::shared_ptr pairingCommand = std::make_shared(vendorId, productId, nodeId); diff --git a/examples/tv-app/tv-common/src/AppTv.cpp b/examples/tv-app/tv-common/src/AppTv.cpp index 38e23b09b0f5ad..c5e071d1ecd5a0 100644 --- a/examples/tv-app/tv-common/src/AppTv.cpp +++ b/examples/tv-app/tv-common/src/AppTv.cpp @@ -593,7 +593,8 @@ class DevicePairedCommand : public Controller::DevicePairingDelegate if (pairingCommand) { ChipLogProgress(DeviceLayer, - "OnDeviceConnectedFn - Updating ACL for node id: " ChipLogFormatX64 " and vendor id: %d and product id: %d", + "OnDeviceConnectedFn - Updating ACL for node id: " ChipLogFormatX64 + " and vendor id: %d and product id: %d", ChipLogValueX64(cbContext->nodeId), cbContext->vendorId, cbContext->productId); GetCommissionerDiscoveryController()->CommissioningSucceeded(cbContext->vendorId, cbContext->productId, @@ -609,7 +610,8 @@ class DevicePairedCommand : public Controller::DevicePairingDelegate if (pairingCommand) { ChipLogProgress(DeviceLayer, - "OnDeviceConnectionFailureFn - Not updating ACL for node id: " ChipLogFormatX64 " and vendor id: %d and product id: %d", + "OnDeviceConnectionFailureFn - Not updating ACL for node id: " ChipLogFormatX64 + " and vendor id: %d and product id: %d", ChipLogValueX64(cbContext->nodeId), cbContext->vendorId, cbContext->productId); // TODO: Remove Node Id } @@ -689,15 +691,15 @@ void ContentAppFactoryImpl::InstallContentApp(uint16_t vendorId, uint16_t produc for (const auto & nodeId : nodeIds) { - ChipLogProgress(DeviceLayer, "Creating Pairing Command with node id: " ChipLogFormatX64 " and vendor id: %d and product id: %d", ChipLogValueX64(nodeId), - vendorId, productId); + ChipLogProgress(DeviceLayer, + "Creating Pairing Command with node id: " ChipLogFormatX64 " and vendor id: %d and product id: %d", + ChipLogValueX64(nodeId), vendorId, productId); std::shared_ptr pairingCommand = std::make_shared(vendorId, productId, nodeId); GetDeviceCommissioner()->GetConnectedDevice(nodeId, &pairingCommand->mOnDeviceConnectedCallback, &pairingCommand->mOnDeviceConnectionFailureCallback); } - } bool ContentAppFactoryImpl::UninstallContentApp(uint16_t vendorId, uint16_t productId) diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index 330f971c939351..214af261e26e54 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -420,14 +420,17 @@ std::set ContentAppPlatform::GetNodeIdsForContentApp(uint16_t vendorId, return {}; } -std::set ContentAppPlatform::GetNodeIdsForAllowVendorId(uint16_t vendorId) { +std::set ContentAppPlatform::GetNodeIdsForAllowVendorId(uint16_t vendorId) +{ std::set result; std::string vendorPrefix = std::to_string(vendorId) + ":"; - for (const auto& pair : mConnectedContentAppNodeIds) { - const std::string& key = pair.first; - if (key.find(vendorPrefix) == 0) { // Check if the key starts with the vendor prefix - const std::set& nodeIds = pair.second; + for (const auto & pair : mConnectedContentAppNodeIds) + { + const std::string & key = pair.first; + if (key.find(vendorPrefix) == 0) + { // Check if the key starts with the vendor prefix + const std::set & nodeIds = pair.second; result.insert(nodeIds.begin(), nodeIds.end()); } }