[lldb/API] Use std::make_unique<> (NFC)
I was holding off on this change until we moved to C++14 as to not have to convert llvm::make_unique to std::make_unique. That happened a while ago so here's the first patch for the API which had a bunch of raw `new`s.
This commit is contained in:
@@ -75,13 +75,13 @@ SBSourceManager::SBSourceManager(const SBDebugger &debugger) {
|
||||
LLDB_RECORD_CONSTRUCTOR(SBSourceManager, (const lldb::SBDebugger &),
|
||||
debugger);
|
||||
|
||||
m_opaque_up.reset(new SourceManagerImpl(debugger.get_sp()));
|
||||
m_opaque_up = std::make_unique<SourceManagerImpl>(debugger.get_sp());
|
||||
}
|
||||
|
||||
SBSourceManager::SBSourceManager(const SBTarget &target) {
|
||||
LLDB_RECORD_CONSTRUCTOR(SBSourceManager, (const lldb::SBTarget &), target);
|
||||
|
||||
m_opaque_up.reset(new SourceManagerImpl(target.GetSP()));
|
||||
m_opaque_up = std::make_unique<SourceManagerImpl>(target.GetSP());
|
||||
}
|
||||
|
||||
SBSourceManager::SBSourceManager(const SBSourceManager &rhs) {
|
||||
@@ -91,7 +91,7 @@ SBSourceManager::SBSourceManager(const SBSourceManager &rhs) {
|
||||
if (&rhs == this)
|
||||
return;
|
||||
|
||||
m_opaque_up.reset(new SourceManagerImpl(*(rhs.m_opaque_up.get())));
|
||||
m_opaque_up = std::make_unique<SourceManagerImpl>(*(rhs.m_opaque_up.get()));
|
||||
}
|
||||
|
||||
const lldb::SBSourceManager &SBSourceManager::
|
||||
@@ -100,7 +100,7 @@ operator=(const lldb::SBSourceManager &rhs) {
|
||||
SBSourceManager, operator=,(const lldb::SBSourceManager &),
|
||||
rhs);
|
||||
|
||||
m_opaque_up.reset(new SourceManagerImpl(*(rhs.m_opaque_up.get())));
|
||||
m_opaque_up = std::make_unique<SourceManagerImpl>(*(rhs.m_opaque_up.get()));
|
||||
return LLDB_RECORD_RESULT(*this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user