[Lldb-commits] [lldb] [lldb][NFCI] Change return type of BreakpointIDList::GetBreakpointIDAtIndex (PR #77166)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 8 10:50:25 PST 2024
================
@@ -20,17 +20,15 @@ using namespace lldb_private;
// class BreakpointIDList
-BreakpointIDList::BreakpointIDList()
- : m_invalid_id(LLDB_INVALID_BREAK_ID, LLDB_INVALID_BREAK_ID) {}
+BreakpointIDList::BreakpointIDList() : m_breakpoint_ids() {}
BreakpointIDList::~BreakpointIDList() = default;
size_t BreakpointIDList::GetSize() const { return m_breakpoint_ids.size(); }
-const BreakpointID &
-BreakpointIDList::GetBreakpointIDAtIndex(size_t index) const {
+BreakpointID BreakpointIDList::GetBreakpointIDAtIndex(size_t index) const {
return ((index < m_breakpoint_ids.size()) ? m_breakpoint_ids[index]
- : m_invalid_id);
+ : BreakpointID());
----------------
bulbazord wrote:
The default constructor for `BreakpointID` sets the breakpoint id and location id to invalid values.
https://github.com/llvm/llvm-project/pull/77166
More information about the lldb-commits
mailing list