diff options
Diffstat (limited to 'source/API/SBCommandInterpreter.cpp')
-rw-r--r-- | source/API/SBCommandInterpreter.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source/API/SBCommandInterpreter.cpp b/source/API/SBCommandInterpreter.cpp index e3332a824..16740868f 100644 --- a/source/API/SBCommandInterpreter.cpp +++ b/source/API/SBCommandInterpreter.cpp @@ -25,6 +25,8 @@ #include "lldb/API/SBStringList.h" #include "lldb/API/SBTarget.h" +#include <memory> + using namespace lldb; using namespace lldb_private; @@ -555,8 +557,8 @@ lldb::SBCommand SBCommandInterpreter::AddMultiwordCommand(const char *name, lldb::SBCommand SBCommandInterpreter::AddCommand( const char *name, lldb::SBCommandPluginInterface *impl, const char *help) { 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); if (new_command_sp && m_opaque_ptr->AddUserCommand(name, new_command_sp, true)) @@ -569,8 +571,8 @@ SBCommandInterpreter::AddCommand(const char *name, lldb::SBCommandPluginInterface *impl, const char *help, const char *syntax) { lldb::CommandObjectSP new_command_sp; - new_command_sp.reset(new CommandPluginInterfaceImplementation( - *m_opaque_ptr, name, impl, help, syntax)); + new_command_sp = std::make_shared<CommandPluginInterfaceImplementation>( + *m_opaque_ptr, name, impl, help, syntax); if (new_command_sp && m_opaque_ptr->AddUserCommand(name, new_command_sp, true)) @@ -631,8 +633,8 @@ lldb::SBCommand SBCommand::AddCommand(const char *name, if (!m_opaque_sp->IsMultiwordObject()) return lldb::SBCommand(); lldb::CommandObjectSP new_command_sp; - new_command_sp.reset(new CommandPluginInterfaceImplementation( - m_opaque_sp->GetCommandInterpreter(), name, impl, help)); + new_command_sp = std::make_shared<CommandPluginInterfaceImplementation>( + m_opaque_sp->GetCommandInterpreter(), name, impl, help); if (new_command_sp && m_opaque_sp->LoadSubCommand(name, new_command_sp)) return lldb::SBCommand(new_command_sp); return lldb::SBCommand(); @@ -646,8 +648,8 @@ lldb::SBCommand SBCommand::AddCommand(const char *name, if (!m_opaque_sp->IsMultiwordObject()) return lldb::SBCommand(); lldb::CommandObjectSP new_command_sp; - new_command_sp.reset(new CommandPluginInterfaceImplementation( - m_opaque_sp->GetCommandInterpreter(), name, impl, help, syntax)); + new_command_sp = std::make_shared<CommandPluginInterfaceImplementation>( + m_opaque_sp->GetCommandInterpreter(), name, impl, help, syntax); if (new_command_sp && m_opaque_sp->LoadSubCommand(name, new_command_sp)) return lldb::SBCommand(new_command_sp); return lldb::SBCommand(); |