tatyana-krasnukha added a comment.
A few modernizations which though don't directly relate to make_shared:
================
Comment at: lldb/source/API/SBCommandInterpreter.cpp:560
lldb::CommandObjectSP new_command_sp;
- new_command_sp.reset(new CommandPluginInterfaceImplementation(
- *m_opaque_ptr, name, impl, help));
+ new_command_sp = std::make_shared<CommandPluginInterfaceImplementation>(
+ *m_opaque_ptr, name, impl, help);
----------------
Why not replace assignment with initialization here and below?
================
Comment at: lldb/source/Target/Thread.cpp:1611
m_curr_frames_sp = frame_list_sp;
}
return frame_list_sp;
----------------
This 'if-else' block may be replaced with
```
if (!m_curr_frames_sp)
m_curr_frames_sp =
std::make_shared<StackFrameList>(*this, m_prev_frames_sp, true);
frame_list_sp = m_curr_frames_sp;
```
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57990/new/
https://reviews.llvm.org/D57990
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits