forked from OSchip/llvm-project
Fix some const-ness issues with BreakpointID & BreakpointIDList.
llvm-svn: 281519
This commit is contained in:
parent
63e8f444c7
commit
db30877477
|
@ -30,9 +30,9 @@ public:
|
|||
|
||||
virtual ~BreakpointID();
|
||||
|
||||
lldb::break_id_t GetBreakpointID() { return m_break_id; }
|
||||
lldb::break_id_t GetBreakpointID() const { return m_break_id; }
|
||||
|
||||
lldb::break_id_t GetLocationID() { return m_location_id; }
|
||||
lldb::break_id_t GetLocationID() const { return m_location_id; }
|
||||
|
||||
void SetID(lldb::break_id_t bp_id, lldb::break_id_t loc_id) {
|
||||
m_break_id = bp_id;
|
||||
|
|
|
@ -34,9 +34,9 @@ public:
|
|||
|
||||
virtual ~BreakpointIDList();
|
||||
|
||||
size_t GetSize();
|
||||
size_t GetSize() const;
|
||||
|
||||
BreakpointID &GetBreakpointIDAtIndex(size_t index);
|
||||
const BreakpointID &GetBreakpointIDAtIndex(size_t index) const;
|
||||
|
||||
bool RemoveBreakpointIDAtIndex(size_t index);
|
||||
|
||||
|
@ -46,9 +46,9 @@ public:
|
|||
|
||||
bool AddBreakpointID(const char *bp_id);
|
||||
|
||||
bool FindBreakpointID(BreakpointID &bp_id, size_t *position);
|
||||
bool FindBreakpointID(BreakpointID &bp_id, size_t *position) const;
|
||||
|
||||
bool FindBreakpointID(const char *bp_id, size_t *position);
|
||||
bool FindBreakpointID(const char *bp_id, size_t *position) const;
|
||||
|
||||
void InsertStringArray(const char **string_array, size_t array_size,
|
||||
CommandReturnObject &result);
|
||||
|
|
|
@ -31,9 +31,10 @@ BreakpointIDList::BreakpointIDList()
|
|||
|
||||
BreakpointIDList::~BreakpointIDList() = default;
|
||||
|
||||
size_t BreakpointIDList::GetSize() { return m_breakpoint_ids.size(); }
|
||||
size_t BreakpointIDList::GetSize() const { return m_breakpoint_ids.size(); }
|
||||
|
||||
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);
|
||||
}
|
||||
|
@ -71,7 +72,8 @@ bool BreakpointIDList::AddBreakpointID(const char *bp_id_str) {
|
|||
return success;
|
||||
}
|
||||
|
||||
bool BreakpointIDList::FindBreakpointID(BreakpointID &bp_id, size_t *position) {
|
||||
bool BreakpointIDList::FindBreakpointID(BreakpointID &bp_id,
|
||||
size_t *position) const {
|
||||
for (size_t i = 0; i < m_breakpoint_ids.size(); ++i) {
|
||||
BreakpointID tmp_id = m_breakpoint_ids[i];
|
||||
if (tmp_id.GetBreakpointID() == bp_id.GetBreakpointID() &&
|
||||
|
@ -85,7 +87,7 @@ bool BreakpointIDList::FindBreakpointID(BreakpointID &bp_id, size_t *position) {
|
|||
}
|
||||
|
||||
bool BreakpointIDList::FindBreakpointID(const char *bp_id_str,
|
||||
size_t *position) {
|
||||
size_t *position) const {
|
||||
BreakpointID temp_bp_id;
|
||||
break_id_t bp_id;
|
||||
break_id_t loc_id;
|
||||
|
|
Loading…
Reference in New Issue