[Lldb-commits] [PATCH] D56425: [BreakpointList] Simplify/modernize BreakpointList (NFC)
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 8 08:13:52 PST 2019
aprantl added inline comments.
================
Comment at: source/Breakpoint/BreakpointList.cpp:18
+static void NotifyChange(BreakpointSP bp, BreakpointEventType event) {
+ if (bp->GetTarget().EventTypeHasListeners(
+ Target::eBroadcastBitBreakpointChanged))
----------------
perhaps:
- factor out bp->GetTarget()?
- pass a BerakpointSP & or Breakpoint & to avoid shared pointer traffic?
================
Comment at: source/Breakpoint/BreakpointList.cpp:189
+ for (const auto &bp_sp : m_breakpoints) {
if (curr_i == i)
+ return bp_sp;
----------------
is the whole point of this loop to do something like m_breakpoints[i]?
why not `std::next(..., i)` ?
================
Comment at: source/Breakpoint/BreakpointList.cpp:200
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)
----------------
separate commit?
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56425/new/
https://reviews.llvm.org/D56425
More information about the lldb-commits
mailing list