From c1fa47526cc2acc21f5c8fcd54dd90becf862aa9 Mon Sep 17 00:00:00 2001 From: Jeff Tung <100387939+jtung-apple@users.noreply.github.com> Date: Wed, 20 Sep 2023 18:26:16 -0700 Subject: [PATCH] Remove test/redundant code --- .../Framework/CHIP/MTRBaseSubscriptionCallback.h | 2 -- .../Framework/CHIP/MTRBaseSubscriptionCallback.mm | 11 ----------- 2 files changed, 13 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h b/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h index b9d7030f9ff79e..42350a51cadbae 100644 --- a/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h +++ b/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.h @@ -108,8 +108,6 @@ class MTRBaseSubscriptionCallback : public chip::app::ClusterStateCache::Callbac // be immediately followed by OnDone and we want to do the deletion there. void ReportError(CHIP_ERROR aError, bool aCancelSubscription = true); - void ReportCurrentData(); - // Called at attribute/event report time to queue a block to report on the Matter queue so that for multi-packet reports, this // block is run and reports in batch. No-op if the block is already queued. void QueueInterimReport(); diff --git a/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.mm b/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.mm index a10cd860d8cdb7..4b313d75c9e6b6 100644 --- a/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.mm +++ b/src/darwin/Framework/CHIP/MTRBaseSubscriptionCallback.mm @@ -58,28 +58,17 @@ return; } - // __block auto * myself = this; mInterimReportBlock = dispatch_block_create(DISPATCH_BLOCK_INHERIT_QOS_CLASS, ^{ mInterimReportBlock = nil; ReportData(); // Allocate reports arrays to continue accumulation mAttributeReports = [NSMutableArray new]; mEventReports = [NSMutableArray new]; - // myself->ReportCurrentData(); }); dispatch_async(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), mInterimReportBlock); } -void MTRBaseSubscriptionCallback::ReportCurrentData() -{ - mInterimReportBlock = nil; - ReportData(); - // Allocate reports arrays to continue accumulation - mAttributeReports = [NSMutableArray new]; - mEventReports = [NSMutableArray new]; -} - void MTRBaseSubscriptionCallback::OnReportEnd() { if (mInterimReportBlock) {