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

Unified Diff: net/socket/udp_socket_win.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/socket/udp_socket_posix.cc ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/udp_socket_win.cc
diff --git a/net/socket/udp_socket_win.cc b/net/socket/udp_socket_win.cc
index 1d7aa187ed18e1ac11740a9454a2b75e99430e76..1b78e75d2a0b5468df8ff63a5768cb69e14e07d6 100644
--- a/net/socket/udp_socket_win.cc
+++ b/net/socket/udp_socket_win.cc
@@ -336,7 +336,7 @@ int UDPSocketWin::GetPeerAddress(IPEndPoint* address) const {
std::unique_ptr<IPEndPoint> remote_address(new IPEndPoint());
if (!remote_address->FromSockAddr(storage.addr, storage.addr_len))
return ERR_ADDRESS_INVALID;
- remote_address_.reset(remote_address.release());
+ remote_address_ = std::move(remote_address);
}
*address = *remote_address_;
@@ -357,7 +357,7 @@ int UDPSocketWin::GetLocalAddress(IPEndPoint* address) const {
std::unique_ptr<IPEndPoint> local_address(new IPEndPoint());
if (!local_address->FromSockAddr(storage.addr, storage.addr_len))
return ERR_ADDRESS_INVALID;
- local_address_.reset(local_address.release());
+ local_address_ = std::move(local_address);
net_log_.AddEvent(NetLogEventType::UDP_LOCAL_ADDRESS,
CreateNetLogUDPConnectCallback(
local_address_.get(),
« no previous file with comments | « net/socket/udp_socket_posix.cc ('k') | net/spdy/spdy_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698