clayborg added inline comments.
================ Comment at: source/Breakpoint/BreakpointList.cpp:22 + Target::eBroadcastBitBreakpointChanged, + new Breakpoint::BreakpointEventData(event, bp)); +} ---------------- If we don't pass a "BreakpointSP& sp", then use std::move? ================ Comment at: source/Breakpoint/BreakpointList.cpp:123-125 return std::find_if(m_breakpoints.begin(), m_breakpoints.end(), // Search full range BreakpointIDMatches(break_id)); // Predicate ---------------- If m_breakpoints is a std::vector, we can keep it sorted and use std::lower_bound for faster lookups ================ Comment at: source/Breakpoint/BreakpointList.cpp:130 BreakpointList::GetBreakpointIDConstIterator(break_id_t break_id) const { return std::find_if(m_breakpoints.begin(), m_breakpoints.end(), // Search full range ---------------- ditto ================ Comment at: source/Breakpoint/BreakpointList.cpp:188 size_t curr_i = 0; - for (pos = m_breakpoints.begin(), curr_i = 0; pos != end; ++pos, ++curr_i) { + for (const auto &bp_sp : m_breakpoints) { if (curr_i == i) ---------------- If we use std::vector this will be O(1) ================ Comment at: source/Breakpoint/BreakpointList.cpp:196 const BreakpointSP BreakpointList::GetBreakpointAtIndex(size_t i) const { std::lock_guard<std::recursive_mutex> guard(m_mutex); ---------------- vsk wrote: > Just call the non-const overload and const_cast? If we use std::vector this will be O(1) Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56425/new/ https://reviews.llvm.org/D56425 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits