Using std::shared_ptr for data types [#METR-21503].

This commit is contained in:
Alexey Milovidov 2016-05-28 17:29:48 +03:00
parent d4eba7602d
commit d4cc4abb62
2 changed files with 3 additions and 3 deletions

View File

@ -527,7 +527,7 @@ std::unique_ptr<Exception> Connection::receiveException()
Exception e;
readException(e, *in, "Received from " + getDescription());
return { e.clone() };
return std::unique_ptr<Exception>{ e.clone() };
}

View File

@ -168,7 +168,7 @@ Connection::Packet MultiplexedConnections::receivePacket()
else
block_extra_info->is_valid = false;
}
return packet;
return std::move(packet);
}
BlockExtraInfo MultiplexedConnections::getBlockExtraInfo() const
@ -240,7 +240,7 @@ Connection::Packet MultiplexedConnections::drain()
case Protocol::Server::Exception:
default:
/// Если мы получили исключение или неизвестный пакет, сохраняем его.
res = packet;
res = std::move(packet);
break;
}
}