face: use move semantics for sockets where possible
Change-Id: I2af595073f862c570c1ce0dcb3717f3d2b9cfd71
Refs: #2613
diff --git a/daemon/face/tcp-face.cpp b/daemon/face/tcp-face.cpp
index 6428b03..39ebe04 100644
--- a/daemon/face/tcp-face.cpp
+++ b/daemon/face/tcp-face.cpp
@@ -32,18 +32,15 @@
TcpLocalFace::protocol, LocalFace,
"TcpLocalFace");
-TcpFace::TcpFace(const shared_ptr<TcpFace::protocol::socket>& socket, bool isOnDemand)
- : StreamFace<protocol>(FaceUri(socket->remote_endpoint()),
- FaceUri(socket->local_endpoint()),
- socket, isOnDemand)
+TcpFace::TcpFace(const FaceUri& remoteUri, const FaceUri& localUri,
+ protocol::socket socket, bool isOnDemand)
+ : StreamFace<protocol>(remoteUri, localUri, std::move(socket), isOnDemand)
{
}
-TcpLocalFace::TcpLocalFace(const shared_ptr<TcpLocalFace::protocol::socket>& socket,
- bool isOnDemand)
- : StreamFace<protocol, LocalFace>(FaceUri(socket->remote_endpoint()),
- FaceUri(socket->local_endpoint()),
- socket, isOnDemand)
+TcpLocalFace::TcpLocalFace(const FaceUri& remoteUri, const FaceUri& localUri,
+ protocol::socket socket, bool isOnDemand)
+ : StreamFace<protocol, LocalFace>(remoteUri, localUri, std::move(socket), isOnDemand)
{
}