From 5f22d3356cda0a9b1521c839c006f61b5cc504fc Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Fri, 26 Jan 2024 10:19:03 -0800 Subject: [lldb][NFCI] Change BreakpointIDList::FindBreakpointID to BreakpointIDList::Contains (#79517) `FindBreakpointID` take a BreakpointID and a pointer to a size_t (so you can get position information). It returns a bool to indicate whether the id was found in the list or not. There are 2 callers of this currently and neither one actually uses the position information, so I removed it. After that, I renamed it to Contains to more accurately reflect the intent. Additionally, I changed the argument type from a reference to a value (because BreakpointID is just a wrapper around 2 integers, copies are cheap). --- lldb/source/Commands/CommandObjectBreakpoint.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lldb/source/Commands/CommandObjectBreakpoint.cpp') diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index 1661d5d..3fdf5cd 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -1485,9 +1485,8 @@ protected: for (auto breakpoint_sp : breakpoints.Breakpoints()) { if (!breakpoint_sp->IsEnabled() && breakpoint_sp->AllowDelete()) { BreakpointID bp_id(breakpoint_sp->GetID()); - size_t pos = 0; - if (!excluded_bp_ids.FindBreakpointID(bp_id, &pos)) - valid_bp_ids.AddBreakpointID(breakpoint_sp->GetID()); + if (!excluded_bp_ids.Contains(bp_id)) + valid_bp_ids.AddBreakpointID(bp_id); } } if (valid_bp_ids.GetSize() == 0) { -- cgit v1.1