From 451741a9d778a260ceee608a26b5fdf2d9926982 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 2 Apr 2020 14:40:59 +0200 Subject: [lldb] Change Communication::SetConnection to take a unique_ptr The function takes ownership of the object. This makes that explicit, and avoids unowned pointers floating around. --- .../source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index f59b70a..ee94a18 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -953,7 +953,7 @@ bool ScriptInterpreterPythonImpl::ExecuteOneLine( true)); #endif if (conn_up->IsConnected()) { - output_comm.SetConnection(conn_up.release()); + output_comm.SetConnection(std::move(conn_up)); output_comm.SetReadThreadBytesReceivedCallback( ReadThreadBytesReceived, &result->GetOutputStream()); output_comm.StartReadThread(); -- cgit v1.1