Skip to content

Commit

Permalink
Fix compilation on newer clang. (project-chip#14868)
Browse files Browse the repository at this point in the history
There's a warning about thinking you are iterating without copying
when you get copied anyway that this code was triggering.
  • Loading branch information
bzbarsky-apple authored Feb 8, 2022
1 parent e91c44e commit 29e6a34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/clusters/bindings/BindingManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ void BindingManager::HandleDeviceConnected(OperationalDeviceProxy * device)
FabricIndex fabricToRemove = kUndefinedFabricIndex;
NodeId nodeToRemove = kUndefinedNodeId;

for (const PendingNotificationEntry & pendingNotification : mPendingNotificationMap)
// Note: not using a const ref here, because the mPendingNotificationMap
// iterator returns things by value anyway.
for (PendingNotificationEntry pendingNotification : mPendingNotificationMap)
{
EmberBindingTableEntry entry;
emberGetBinding(pendingNotification.mBindingEntryId, &entry);
Expand Down

0 comments on commit 29e6a34

Please sign in to comment.