Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(888)

Unified Diff: net/socket/udp_socket_posix.cc

Issue 2503993002: Change unique_ptr::reset() for std::move (Closed)
Patch Set: Change unique_ptr::reset() for std::move Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/server/http_server_unittest.cc ('k') | net/socket/udp_socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/udp_socket_posix.cc
diff --git a/net/socket/udp_socket_posix.cc b/net/socket/udp_socket_posix.cc
index 10b6762e554bef51c3bfa2262125c49d0b59c0b1..395541e0f8c59b2d7bb50e80598992a5d4daf8c8 100644
--- a/net/socket/udp_socket_posix.cc
+++ b/net/socket/udp_socket_posix.cc
@@ -245,7 +245,7 @@ int UDPSocketPosix::GetPeerAddress(IPEndPoint* address) const {
std::unique_ptr<IPEndPoint> address(new IPEndPoint());
if (!address->FromSockAddr(storage.addr, storage.addr_len))
return ERR_ADDRESS_INVALID;
- remote_address_.reset(address.release());
+ remote_address_ = std::move(address);
}
*address = *remote_address_;
@@ -265,7 +265,7 @@ int UDPSocketPosix::GetLocalAddress(IPEndPoint* address) const {
std::unique_ptr<IPEndPoint> address(new IPEndPoint());
if (!address->FromSockAddr(storage.addr, storage.addr_len))
return ERR_ADDRESS_INVALID;
- local_address_.reset(address.release());
+ local_address_ = std::move(address);
net_log_.AddEvent(
NetLogEventType::UDP_LOCAL_ADDRESS,
CreateNetLogUDPConnectCallback(local_address_.get(), bound_network_));
« no previous file with comments | « net/server/http_server_unittest.cc ('k') | net/socket/udp_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698