Skip to content

Commit

Permalink
Remove _storedCompressedFabricID on MTRDeviceController.
Browse files Browse the repository at this point in the history
Both subclasses override the getter, so we should just mark it as abstract and
stop pretending to have state we don't actually have.
  • Loading branch information
bzbarsky-apple committed Nov 1, 2024
1 parent 4efe777 commit 99d6cc9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/darwin/Framework/CHIP/MTRDeviceController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@

#include <atomic>
#include <dns_sd.h>
#include <optional>
#include <string>

#import <os/lock.h>
Expand Down Expand Up @@ -94,8 +93,6 @@ - (instancetype)initWithDelegate:(id<MTRDeviceControllerDelegate>)delegate queue
@implementation MTRDeviceController {
os_unfair_lock _underlyingDeviceMapLock;

std::atomic<std::optional<uint64_t>> _storedCompressedFabricID;

// For now, we just ensure that access to _suspended is atomic, but don't
// guarantee atomicity of the the entire suspend/resume operation. The
// expectation is that suspend/resume on a given controller happen on some
Expand Down Expand Up @@ -504,8 +501,8 @@ - (void)asyncDispatchToMatterQueue:(dispatch_block_t)block errorHandler:(nullabl

- (nullable NSNumber *)compressedFabricID
{
auto storedValue = _storedCompressedFabricID.load();
return storedValue.has_value() ? @(storedValue.value()) : nil;
MTR_ABSTRACT_METHOD();
return nil;
}

#ifdef DEBUG
Expand Down

0 comments on commit 99d6cc9

Please sign in to comment.