Skip to content

Commit

Permalink
Fix compilation on newer clang. (#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 and pull[bot] committed Oct 13, 2023
1 parent 4f3d345 commit 2823477
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 2823477

Please sign in to comment.