Skip to content

Commit 50d2d33

Browse files
committed
Fix BroadcasterManager::RemoveListener to really remove the listener
This appears to be a real bug caught by -Wunused-value. std::find_if doesn't modify the underlying collection, it just returns an iterator pointing to the matching element. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D74010
1 parent 7531a50 commit 50d2d33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Utility/Broadcaster.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ void BroadcasterManager::RemoveListener(Listener *listener) {
406406
listener_collection::iterator iter = m_listeners.begin(),
407407
end_iter = m_listeners.end();
408408

409-
std::find_if(iter, end_iter, predicate);
409+
iter = std::find_if(iter, end_iter, predicate);
410410
if (iter != end_iter)
411411
m_listeners.erase(iter);
412412

0 commit comments

Comments
 (0)