[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.
This commit is contained in:
Pavel Labath
2020-04-02 14:40:59 +02:00
parent 13a1504ffb
commit 451741a9d7
14 changed files with 33 additions and 35 deletions

View File

@@ -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();